<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 Amir,<div class=""><br class=""></div><div class="">Please read up on the semantics of for-in loops & generators, and if you think this is a good idea, then propose the actual language changes necessary to provide this behavior. Thanks,</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 5:12 AM, Amir Michail 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class="">Examples:</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class=""><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 1.4737em;" class=""><br class=""></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 1.4737em;" class="">var x=[1,2,3]</div></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class="">for inout v in x {</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class=""> v++</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class="">}</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51); min-height: 8pt;" class=""><br class=""></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class=""><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 1.4737em;" class="">for inout d in d1, d2, d3 { // can’t use list here as it would result in copying of dictionaries</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 1.4737em;" class=""> d.removeAll()</div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; line-height: 1.4737em;" class="">}</div></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class=""><br class=""></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51); min-height: 8pt;" class=""> <br class="webkit-block-placeholder"></div><div style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 16px; font-family: 'Myriad Set Pro', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; vertical-align: baseline; line-height: 1.4737em; color: rgb(51, 51, 51);" class=""><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=RC5Cq0zAxCHc1sM9Uy3-2BojrrUAw-2F96zH69NULNHPvCt-2FNC71H95QVgFlpGI50C-2Fd2arIZGvP8xmN4IRCTMYX7EMDOeXCjX-2FMRCh1vz8uHkiqNNGckwIDmJX8yelnK0WCbQS7eO8dqInbk2LAYbaLptOIsvf8NBGZrG3f-2BPoCilNZB64hsNXsOcY0xl6-2BU6kt8WFprQT8cpaP6bI989S3juQG4r9vGsHzbaO0A8LTR4A-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;" class="">
</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>