3 ms·
It's telling that you prefer Kotlin and Clojure. The few languages that are as popular as Java or more (JS, Python) have most of the problems you mentioned and
by pron 2y ago
It's telling that you prefer Kotlin and Clojure. The few languages that are as popular as Java or more (JS, Python) have most of the problems you mentioned and more (and some newer languages, like Go, too). I.e. the vast majority of new software written in 2024 is written in languages that you think are "painful" and outdated. Quite a few of those who prefer these languages have actually tried languages that are richer (or mainstream) -- i.e. those that you call "modern" but some of which predate Java or are of the same age -- and found them inappropriate for their usecase for various reasons.
The thing is that programmers simply don't agree on what they want to have in their programming language. Some are absolutely certain that they need feature X and others are equally certain that feature X would make things much worse. They have contradictory views on what's better. But their preferences are not evenly distributed, and some views are held by more people than others. Languages that aim to be very popular need to target the majority view, and it doesn't matter whether majority views are justified in some objective sense.
But it goes further than that because the goal of a programming language is to produce software and the goal of software is to produce value that is usually measured in economic (i.e. monetary) terms. For a language to maximise monetary values it must accept some environmental realities, such as that most programmers who will be writing the software to produce monetary value are relative beginners, and so a language that is less attractive to beginners is likely to be less valuable, and so less succesful in the market.
That is why you see that over time, Java adopts more and more features that were present in ML (in retrospect, arguably the most influential typed programming language ever) in the mid-seventies. But that's not to say that ML is more modern or even that in 2005 it was "better" than Java, only that the preferences of the broad market have shifted over time so that certain features that were in ML in the seventies only became valuable to the market much later. That's why Java's designers, who knew ML back when they designed Java, chose to adopt its features only very gradually (Java's generics, lambdas, type inference, records, and pattern-matching all came from ML). Did those who picked ML to write their software in 2003 end up better off than those who picked Java? I don't think so.
- alex_lav 2y agoIt's worth noting that you're a Java dev, working on OpenJDK at Oracle (per your profile here). Which is to say, your bias is....pretty extreme.
- pron 2y agoI don't think I have any more bias than any other programmer. But I do have some insider insight into the considerations that go into the design of popular mainstream languages.
- owlstuffing 2y ago> I don't think I have any more bias than any other programmer. Oh my. Quite the tell.
- alex_lav 2y ago> I don't think I have any more bias than any other programmer. I do not agree at all, but to each their own!
- airstrike 2y agoI don't think Java is as prevalent as it is because it's quote-unquote "preferred" by developers... There's a difference between being prevalent and being popular.
- pron 2y agoIt's not necessarily preferred in the sense that those who think a lot about programming language think of language preference (i.e. like the preference of a connoisseur), but it is, nevertheless preferred because most programmers don't think of programming languages like programming language fans do (or, indeed, as much). A language can be preferred because it happens to be what you know and you're interested in writing programs rather than learning more languages, and it is the language you know because it's the language you've been taught, and it's the language you've been taught because it appeals to those who choose what languages to teach. Evolving the design of very successful languages requires a different kind of thinking about programming languages than that of programming language fans, who don't usually think of maximising economic utility in a certain market environment when they think about what they like in a language.
- airstrike 2y agoI don't think one needs to be a "connoisseur" to prefer something other than Java. I also don't think Java appeals to those who choose what languages to teach. IMHO it's just a self fulfilling prophecy. A combination of it being widespread in the past, there being jobs for Java because of that, employers expecting students to learn it, students expecting to be taught it, and professors sticking to what they know. Again, in my opinion, viewing any of those as a valid reason for choosing to use/learn/teach Java implies favoring convenience over value. I prefer not to do that, but I understand people have different views of the world and belief systems...
- woooooo 2y agoBeing a moderate, lowest common denominator language does have its own value, though. It's easy to reason about, easy to hire for and easy to pick up if you know other mainstream languages. It's not just the chicken-egg market dominance thing you're describing.