Support use of an optional label for the first trailing closure

So the feature is out in the wild now and I tried it out with SwiftUI.

Here is my small report:

// now we can write this
Button {
  ...
} label: {
  ...
}.modifier()

// we could correct the alignment
Button
  .init {
    ...
  }
  label: {
    ...
  }
  .modifier()

// however, the ideal version should rather look like this 
Button
  action: {
    ...
  }
  label: {
    ...
  }
  .modifier()
17 Likes