Yes, thank you Dmitri, I think so too. Will come back to this later. TedvG
ted van gaalen > On 19 Mar 2016, at 08:46, Dmitri Gribenko <griboz...@gmail.com> wrote: > > Hi Ted, > > Thank you for starting this thread. I agree that removing the C-style > for loop has degraded the readability and clarity of some of numerics > code. > > In the feedback to SE-0007 many people have said that they can convert > their code to for-in loops, but I think this actually means that in > code that is typically written in Swift today, loops primarily operate > on sequences and collections. It means that numerics is a domain that > not many people work in. But it is a very important domain > nevertheless, and clarity for numerics code matters at least as much > as it does everywhere else. > > I think one way to approach this discussion would be to present > multiple concrete code samples that contain C-style for loops and are > awkward to write without them. We can then try looking for patterns, > generalize and simplify, and discuss possible solutions. > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution