[swift-evolution] Proposal: Drop parentheses for initalization from tuple
dan.riccardelli at gmail.com
Sat May 7 14:42:58 CDT 2016
I was thinking that the syntax for initialization from tuple is a bit more
verbose than needed, i.e. why not simply drop the tuple parentheses and go
from this :
*let* (name, surname) = (*"*John*"*, *"*Doe*"*)
*let* name, surname = (*"*John*"*, *"*Doe*"*)
similarly to what Python does with "unpackable" types:
name, surname = ("John", "Doe")
This is not a revolution, but if the concern is the trade-off between
conciseness and readability, I think this way we are being more concise
while not losing points in readability.
This would of course break existing code, but updating to this syntax would
What do you think?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution