Hello. Just a quick unlurk. I love arguing about this stuff :-)
Daniel Schulze wrote:
>
> > Also, you do for loops with "++i" increments instead of "i++" in both
> > J2eeDeployer.java and URLWizzard.java, witch is bad coz you end up bypassing
> > some array items.
>
> Well, is doesnt matter, because in for loops first the increment
> expression (everything after the second semicolon) is evaluated and then
> the middle expression (between the both semicolons) is evaluated. So its
> the same...
> Its a relict of a time were computers were weak and in plain C it was
> faster
I would argue it is more than just a relic, that it is a clearer
expression of what you're trying to do, i.e. simply increment i.
The syntax "++i" is just shorthand for "(i += 1)", which is exactly the
increment expression you want. The syntax "i++" is shorthand for "(i +=
1, i - 1)" or somesuch. The compiler is almost certainly going to
generate the same code for both in this case, but for me, at least,
seeing "i++" make me think, "why do we want the old value of i?"
Sorry for the content-free rant. I am itching to get our application
running on jBoss, but only have time to follow the lists at the moment.
Regards,
Toby.
--
Toby Allsopp
Research
Peace Software International Ltd
Ph +64-9-3730400