I think the real original sin was the decision to be a dumbed-down C++, avoiding all the ugliness and hard to get right parts, in particular eliminating operator overloading. With operator overloading supporting the normal meanings of the operators (== means equals, not identical to). Integer would then work the same as int and auto-unblocking would have been there from the beginning. Remember Java overloads '+' for strings, so it isnt consistent.
Primitives made sense at the time, but with operator overloading we wouldnt be stuck with the mess we have now.
And methods should have been first-class objects. More messes that could have been avoided.
Except the most common criticism of C++ is for being "too complex" or "too clever", so it seems there's nothing inherently wrong in trying to be a "dumbed-down C++, avoiding all the ugliness". You're just saying it made the wrong trade-offs in places.
Not just methods -- classes should have been first-class objects!
Unfortunately, vocational Java programmers are terrified of anything that resembles metacircularity. There's a depressing tendency to just label anything mildly functional as 'closures'.
I assume you mean primitive data types not being first-class objects? When Java was born, Smalltalk had a very long history of Ints and Chars being first class objects. The VM/byte-code compiler took care of in-lining values to make their time/space behavior as if they were primitive data types.
Also, Java was originally targeted at very low end machines - think WebTV. IMO, the top things wrong with Java are:
Too many concepts that overlap - containers, arrays, generics, iterators, classes, interfaces, etc. An important factor in whether you want to use a language is "how many concepts am I going to have to understand to read other peoples code ?"
A lot of the library is very poorly designed, probably because they rushed it out the door. Take a look at the GUI inheritance hierarchy for instance. Also, a lot of the code looks like C code IIRC.
Comments
I think the real original sin was the decision to be a dumbed-down C++, avoiding all the ugliness and hard to get right parts, in particular eliminating operator overloading. With operator overloading supporting the normal meanings of the operators (== means equals, not identical to). Integer would then work the same as int and auto-unblocking would have been there from the beginning. Remember Java overloads '+' for strings, so it isnt consistent.
Primitives made sense at the time, but with operator overloading we wouldnt be stuck with the mess we have now.
And methods should have been first-class objects. More messes that could have been avoided.
Except the most common criticism of C++ is for being "too complex" or "too clever", so it seems there's nothing inherently wrong in trying to be a "dumbed-down C++, avoiding all the ugliness". You're just saying it made the wrong trade-offs in places.
Not just methods -- classes should have been first-class objects!
Unfortunately, vocational Java programmers are terrified of anything that resembles metacircularity. There's a depressing tendency to just label anything mildly functional as 'closures'.
You've noticed that too? I spent six months confused, wondering why most of the so-called closures in Java examples were merely first-class functions.
"Primitives made sense at the time"
I assume you mean primitive data types not being first-class objects? When Java was born, Smalltalk had a very long history of Ints and Chars being first class objects. The VM/byte-code compiler took care of in-lining values to make their time/space behavior as if they were primitive data types.
Also, Java was originally targeted at very low end machines - think WebTV. IMO, the top things wrong with Java are:
Too many concepts that overlap - containers, arrays, generics, iterators, classes, interfaces, etc. An important factor in whether you want to use a language is "how many concepts am I going to have to understand to read other peoples code ?"
A lot of the library is very poorly designed, probably because they rushed it out the door. Take a look at the GUI inheritance hierarchy for instance. Also, a lot of the code looks like C code IIRC.