<head></head><body>Data of 1: I misunderstood the second comprehension until I saw it written in Swift, and I do know about list comprehensions from Erlang. <div><div><br></div><div>I agree that this seems to contradict "clarity over brevity".</div><div><br<br>—<div>Alex Popov Jr.</div><div>Principal iOS Developer | Shelfie</div></br<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Dec 17 2015, at 12:44 pm, Amir Michail via swift-evolution <swift-evolution@swift.org> wrote:
<br>
<meta content="text/html charset=utf-8"><br><div><blockquote type="cite"><div>On Dec 17, 2015, at 3:27 PM, Adrian Kashivskyy <<a href="mailto:adrian.kashivskyy@me.com">adrian.kashivskyy@me.com</a>> wrote:</div><br><div><meta content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Amir, your proposal contradicts "clarity over brevity" principle. As pointed by Liam all those things are fairly easy to do without any major complexity.<br><div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div></div></div></div></blockquote><div><br></div><div>I think the comprehensions are very clear though.</div><br><blockquote type="cite"><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Pozdrawiam – Regards,</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Adrian Kashivskyy</div>
</div>
<br><div><blockquote type="cite"><div>Wiadomość napisana przez Amir Michail via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> w dniu 17.12.2015, o godz. 17:26:</div><br><div><div>Python examples:<br><br>l = [x*x for x in range(10)] // list comprehension<br><br>l2 = [(x,y) for x in range(10) for y in range(10) if x + y < 8] // another list comprehension<br><br>g = (x*x for x in range(10)) // generator comprehension<br><br>d = {x:x*x for x in range(10)} // dictionary comprehension<br><br><br>I think most programmers would like using these. They are concise and easy to understand.<br><br>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></div></blockquote></div><br></div></div></blockquote></div><br>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=CmwAv3oRa0AH4Hd1bWC6X-2BzbhPqo1YEo6mPHEujr90sblMts0lyHPlhqzvj-2Fp-2BC5OEMkczNuE6qNGof856voE-2BZnswBliGIoLaS-2BjycYlE0gnxN5cGJ98YQMEUtmMgZFbBpSh1ddBJSm21Gb1SvtRV0-2BUl5I9pgd4gfaSj3QH9liTjcXY0B-2FKLe-2BGskz0t2ZkdLzgQYgLttL6QnIT6UrERxZgyT9dQfFRCqL1CVFzAU-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;">
</blockquote></body>