How Scala Changed My Programming Style
artima.com
How Scala Changed My Programming Style
1–10 of 21 posts
Re: How Scala Changed My Programming Style
#2Re: How Scala Changed My Programming Style
#3Re: How Scala Changed My Programming Style
#4I have no idea why anyone would use ++i (though technically correct) instead of i++ in a for loop's incrementation clause since the incrementation is done after the loop body, not before... That just seems like willfully confusing intuition.
Re: How Scala Changed My Programming Style
#5And, no, I have not written any Scala books and have no Scala-related products/services to sell you.
Re: How Scala Changed My Programming Style
#6I have no idea why anyone would use ++i (though technically correct) instead of i++ in a for loop's incrementation clause since the incrementation is done after the loop body, not before... That just seems like willfully confusing intuition.
Not that pre- and post-increment are ever that intuitive or transparent...
Re: How Scala Changed My Programming Style
#7I have no idea why anyone would use ++i (though technically correct) instead of i++ in a for loop's incrementation clause since the incrementation is done after the loop body, not before... That just seems like willfully confusing intuition.
as: FOO; while (BAR) { BODY; BAZ; }
Hence, ++i and i++ mean the same in this context. The difference, as mentioned already, is that i++ creates a copy of i.
Re: How Scala Changed My Programming Style
#8Re: How Scala Changed My Programming Style
#9I have no idea why anyone would use ++i (though technically correct) instead of i++ in a for loop's incrementation clause since the incrementation is done after the loop body, not before... That just seems like willfully confusing intuition.
look at for loops like this: for (FOO; BAR; BAZ) { BODY } as: FOO; while (BAR) { BODY; BAZ; } Hence, ++i and i++ mean the same in this context. The difference, as mentioned already, is that i++ creates a copy of i.
Re: How Scala Changed My Programming Style
#10Earlier quoted context omitted.
look at for loops like this: for (FOO; BAR; BAZ) { BODY } as: FOO; while (BAR) { BODY; BAZ; } Hence, ++i and i++ mean the same in this context. The difference, as mentioned already, is that i++ creates a copy of i.
Uh? Maybe with a brain-damaged compiler?