+0
I am not necessarily opposed to the syntax as shown in the examples. However, the explicitness is dependent on this
UIView.animate(withDuration: 0.3) {
self.view.alpha = 0
} completion: { _ in
self.view.removeFromSuperview()
}
not turning into this
UIView.animate(withDuration: 0.3) {
self.view.alpha = 0
}
completion: { _ in
self.view.removeFromSuperview()
}
which makes the trailing closure completion: {}
only one character different than a function call with a single trailing closure (completion {}
)
This may seem like an obvious "just keep your formatting straight and follow the style guide", but beginners are not formatting experts and are often off by one critical syntax character.
(I brought this up last review, but things were a bit; shall we say, lively )