Re:How Scala Changed My Programming Style
by avigesaa on Wednesday April 29, 2009 @02:04PM
(#585543)
I use ++i in for loops because pre-incrementing is the semantically correct option. I've never understood why i++ came into favor; can anyone shine some light on it for me?
[ Parent
| on HN ]
Re:How Scala Changed My Programming Style
by lincolnq on Wednesday April 29, 2009 @03:17PM
(#585679)
My hypothesis: it has better rhythm -- the repetition of 'i' at the beginning of each piece of the for loop makes it nice and easy to remember. I bet people would tend to learn this when they were first learning how to code and then never change because it never caused them any problems.