4 ms·
Yes, Java does have its weaknesses. It's an old language and people were still figuring out a lot of the stuff. But the ecosystem is huge and if you know the qu
by JanSt 7y ago
Yes, Java does have its weaknesses. It's an old language and people were still figuring out a lot of the stuff. But the ecosystem is huge and if you know the quirks, it's still a heck of a productive language.
> Java inner classes suddenly appeared in 1997; it took more than a year to update the specification, and it became almost twice as big as a result. That’s a high price to pay for a non-essential feature.
I can't talk about the doubling of the specification but you can learn everything you need to about inner classes on 5 pages or so. It's over 20 years old now.
> generic arrays aren’t supported
So you can't use something with arrays that go doesn't even support ;-)
> type wildcards with upper and lower bounds are quite complicated.
Well, it's two words (extends and super) and some syntax. How could it be much easier?
> Enum [...] It’s certainly nice to have, but offers little that couldn’t be done with ordinary classes
Yes, and generics offer little that couldn't be done by implementing specialised classes. Enums are there to help you. You see an enum? You know what happens, you know what it offers, you know it's not a "normal" class but is there for a special reason.
Yes, Java does have its inconsistencies. Why is String Immutable when in a OO-language the opposite would be taken for granted? Why can't you use int as a datatype for an ArrayList but Integer? What's up with Stack and Deque and Vector? You have to know Java to work with it effectively. We are professionals after all. It can be expected that we know the language. Java gets the job done.
That's not to say that Go couldn't get ahead of Java and may be the better language (especially in the future). But the ecosystem is far from it for now and Go has to prove it won't suffer from the same problems Java is now.