3 ms·
The special-casing of Blocks irks me, including the fact that you can only have 1 of them in a single method call. I understand the justification, but it’s synt
by amomchilov 3y ago
The special-casing of Blocks irks me, including the fact that you can only have 1 of them in a single method call. I understand the justification, but it’s syntactically inconsistent and doesn’t sit right with me.
I really like the way Swift introduced closures as regular parameters, but lets you have the Ruby-like “trailing closure syntax” for the last one in the list. It’s very best-of-both worldsy: if you need just one closure, it can be trailing, and if you need multiple, they can both look the same.