<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=""><div class="">I guess I am not in the forloopian camp. I spend far too much time, converting for i = 0; i &lt; 4; i++) into something more modern like iterating over containers. If it is in the language, people will use it, not having it there makes people think about better ways of doing things rather than relying on muscle memory. I know it is a barrier for some but other languages such as Python don’t support this construct and no one will deny that Python is heavily used in numerics.&nbsp;</div><div class=""><br class=""></div><div class="">- Paul</div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 19, 2016, at 1:28 AM, ted van gaalen via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Yes, thank you Dmitri, I think so too.</div><div class="">Will come back to this later.</div><div class="">TedvG</div><div class=""><br class=""><br class=""><div class=""><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><br class=""></span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">ted van gaalen</span></div><div class=""><div apple-content-edited="true" class=""><div class=""><div class=""><font class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""></span></font></div></div></div></div></div></div><div class=""><br class="">On 19 Mar 2016, at 08:46, Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" class="">gribozavr@gmail.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><span class="">Hi Ted,</span><br class=""><span class=""></span><br class=""><span class="">Thank you for starting this thread. &nbsp;I agree that removing the C-style</span><br class=""><span class="">for loop has degraded the readability and clarity of some of numerics</span><br class=""><span class="">code.</span><br class=""><span class=""></span><br class=""><span class="">In the feedback to SE-0007 many people have said that they can convert</span><br class=""><span class="">their code to for-in loops, but I think this actually means that in</span><br class=""><span class="">code that is typically written in Swift today, loops primarily operate</span><br class=""><span class="">on sequences and collections. &nbsp;It means that numerics is a domain that</span><br class=""><span class="">not many people work in. &nbsp;But it is a very important domain</span><br class=""><span class="">nevertheless, and clarity for numerics code matters at least as much</span><br class=""><span class="">as it does everywhere else.</span><br class=""><span class=""></span><br class=""><span class="">I think one way to approach this discussion would be to present</span><br class=""><span class="">multiple concrete code samples that contain C-style for loops and are</span><br class=""><span class="">awkward to write without them. &nbsp;We can then try looking for patterns,</span><br class=""><span class="">generalize and simplify, and discuss possible solutions.</span><br class=""><span class=""></span><br class=""><span class="">Dmitri</span><br class=""><span class=""></span><br class=""><span class="">-- </span><br class=""><span class="">main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if</span><br class=""><span class="">(j){printf("%d\n",i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" class="">gribozavr@gmail.com</a>&gt;*/</span><br class=""></div></blockquote></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=""></body></html>