| Sign In/My Account | View Cart |
| Article: |
Readable Java 1.5 | |
| Subject: | I like this | |
| Date: | 2003-09-25 11:34:38 | |
| From: | sjungels | |
|
Response to: I like this
|
||
| I think you understood my point very well. Part of the reason I was motivated to write this in the first place is that I think one of the most important things a language designer owes his users, is continuity. A ":" that means foreach is probably all right for Perl programmers. Likewise, angle bracket generics are going to please C++ programmers. But neither one strikes me as consistent with "the Java way," which is more verbose and clear, and which I really like. | ||
Showing messages 1 through 4 of 4.
Also, the characterisation of 'the java way' as more verbose and clear is fair enough, but this characteristic is quite unevenly applied - cf 'for (;;)'. In particular, there's no real increase in verbosity over C++, when it comes to control flow type of code (that I can think of).
So, there's clearly a precedent for terse initially confusing syntax in Java.
for (T t : coll) is going to be a commonly used construct, so the terseness is ultimately a benefit - I would argue in readability as well as writeability.
Conceptually, it's certainly easier to get one's head around than for(init;test;uh...thingy)
In the end, IMO, your proposals dont really offer anything over and above the 1.5 syntax. But the article was interesting and thought provoking.