The argument in favor of this change isn't readability, it's writability.
When you are reading code in the current syntax, with intermixed )
and }
, there's no real need to distinguish between the two glyphs in order to understand what's going on. It's all just nesting and delimiting. Having }
instead of )
doesn't matter much.
However, when you are writing such code, if you omit a )
or }
, or interchange them by accident, then the structure of the expression you're writing is so broken that it's unlikely the compiler can point you in the direction of a fix. In addition, you almost certainly have multiple structural errors simultaneously. (Yes, I know my description is a bit over-simplified, but I'm making a point.)
The advantage of using }
throughout is that it reduces the structural error possibilities to just an excess of }
or a deficit of }
, and you can fix the problem by basically adding or removing }
at the end. (Yes, I know my description is a bit over-simplified, but I'm making a point.)
OTOH, I completely agree with @xwu that this proposal isn't actually trailing closures, and with @Karl that the virtue of the proposed syntax is with SwiftUI or other function-builder-based schemes, where there are multiple closure-like things because it's about data structure.
This is probably the fork-in-the-road moment, where function-builders shouldn't be squished into Swift executable code syntax, and executable code syntax shouldn't be deformed by the needs of DSLs. It seems bizarre to think that the same syntax will serve both goals as Swift moves forward.
There's deeper thought needed here, and I think the community should think more deeply before making Swift syntax more inscrutable.