|
|
|
|
|
by kartickv
3699 days ago
|
|
A beginner should be made to learn something only if they get an advantage out of it in readability or type safety or performance or something else. I don't see that being the case for pre- and post-increment. If anything, I find: i += 1;
String name = names[i]; more readable than String name = names[++i]; where I have to pause and remind myself of pre- and post- increment and which one is being used here and mentally translate the code into the above version. Imperative languages already have a way of specifying execution order: it's the order of statements in your file. Let's reuse that rather than making things more complex. |
|