<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Daniele, to me at first glance, it looks like a shorthand for creating multiple variables. I would expect to try something like this later: “print(name); print(surname)”, which of course wouldn’t be the intent.<div class=""><br class=""></div><div class="">Basem</div><div class=""> </div><div class=""><div><blockquote type="cite" class=""><div class="">On May 7, 2016, at 3:42 PM, Daniele Riccardelli via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">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 :</div><div class=""><b class="">let</b> (name, surname) = (<b class="">"</b>John<b class="">"</b>, <b class="">"</b>Doe<b class="">"</b>)</div><div class=""><br class=""></div><div class="">to this:</div><div class=""><b class="">let</b> name, surname = (<b class="">"</b>John<b class="">"</b>, <b class="">"</b>Doe<b class="">"</b>)<br class=""></div><div class=""><br class=""></div><div class="">similarly to what Python does with "unpackable" types:</div><div class="">name, surname = ("John", "Doe")</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">This would of course break existing code, but updating to this syntax would be trivial.</div><div class=""><br class=""></div><div class="">What do you think?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Daniele</div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>