Max Lybbert
Posts: 314
Nickname: mlybbert
Registered: Apr, 2005
|
|
Why I don't like Java
|
Posted: Feb 13, 2007 8:31 AM
|
|
My real pain points with Java:
(1) strange rules (say, files must be named after the class, therefore they cannot be named anything that's not a valid identifier; and they must have a four-letter suffix (.java, .class) making it impossible to implement Java on something without long file name support -- and not that the long filenames do anything -- if I pass a file to the compiler, does it matter that it's named 'something.java'? And each .class file begins with '0xcafebabe', so '.class' is unnecessary; and the requirement that *everything* must be object-oriented, regardless of what the program does);
(2) Java's concern that "adding this feature would confuse programmers" (say, pointers, multiple inheritance, Generics that do something other than autocast, or anything not object-oriented enough) makes it a lot like Visual Basic with a C-like syntax;
(3) Willingness to claim C++'s heritage, but failure to learn from C++. For instance, Java did not start with namespaces (called packages), even though Sun's engineers have been used as an example of why namespaces are needed (a Sun engineer created a function called "mktmp" with the same signature as an internal function of a library he was using; sometimes the wrong mktmp would be called and since the two functions did different things, this led to a hard-to-track bug). Or Java's language designers are willing to give partial solutions to problems (say, Generics), but not solve the general problem (say, a good macro system that would handle what Generics, AOP, and what Generics could do if they were like C++ templates; "but that would confuse professional programmers"). C++ and Perl try to give programmers general solutions to general problems. Java seems to want to give partial solutions to specific problems.
|
|