Why do folks still use for loops instead of neg while-- loops when iteration direction isn't an issue? Neg while is faster and less verbose.
-
-
Replying to @csuwildcat
@csuwldcat because it's gross looking, and the interpreter should optimize for loops
2 replies 0 retweets 0 likes -
Replying to @seanmonstar
@seanmonstar @csuwldcat how do you want it to? that's a big change in execution order that would break a lot of programs1 reply 0 retweets 0 likes -
Replying to @FremyCompany
@FremyCompany@seanmonstar precisely why I said "when iteration direction doesn't matter", I fully understand that it depends on the case ;)1 reply 0 retweets 0 likes -
Replying to @csuwildcat
@csuwldcat
@seanmonstar you did know that, not the person who replied it's up to the compiler to do that ;-)2 replies 0 retweets 0 likes -
Replying to @FremyCompany
@FremyCompany @csuwldcat I didn't mean the compiler should reverse order. I meant it should find how to make them same speed when possible1 reply 0 retweets 0 likes -
Replying to @seanmonstar
@seanmonstar @csuwldcat they certainly do try. if you don't know how they do it, how do you keep the right patterns? you can't control it.1 reply 0 retweets 0 likes -
Replying to @FremyCompany
@FremyCompany hm? I just meant that speed improvements like that should be the concern of compiler, not those writing loops.2 replies 0 retweets 0 likes -
Replying to @seanmonstar
@seanmonstar reversed for loops aren't hard to read, or write. it's all about traditions.1 reply 0 retweets 0 likes
@FremyCompany it's how humans process things. We count up. Programming languages are for computers to understand humans, not vice versa.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.