|
Local type inference, records, and switch expressions (alongside lambdas and generics) are all ML features, as every language designer will tell you (and Java did them quite differently from Kotlin). All of them, by the way, were well known to Java's original designer in the nineties, it's just that they thought it will be a while until mainstream programmers are ready for them, so their adoption in Java is best postponed. BTW, even if you're not aware of ML's extraordinary influence on most programming languages, surely you're aware there are competitors to Java with analogous features that are far bigger than Kotlin. As for string templates, our intent is not to have a feature simiar to what Kotlin offers. We obviously look at all languages regardless of popularity, but in that case, as we did in the case of virtual threads or records, we'll probably say, no, that's not what we want, to Kotlin's approach (even the Preview that we pulled was nothing like Kotlin's approach). > I'm sure there's tech-debt and esoteric compatibility concerns which make evolving Java hard Backward compatibility is rarely a hindrance at all. People just talk about it a lot because most organisations consistently say that backward compatibility is much more important to them than any language feature, but it's not all that hard to maintain. > but from a developer's perspective it's just glacial to evolve and the result is weaksauce. I find that statement hard to reconcile with the fact that the only languages as popular as Java or more are JS/TS and Python, while all the languages that are not "weaksauce" from "a developer's perspective" are doing far, far worse than Java. There has never, ever, been any sort of consensus among developers on the right set of features, and there have always been developers who prefer more features and those who prefer less. It's perfectly fine to be on one side or the other or even to say, "yes, I'm in the minority, but I still think I'm right", but I find it strange to claim to represent "the developer's perspective" when your preferences are mostly associated with languages that are doing worse rather than better. |
There are definitely many programmers who have a very parochial understanding of programming. They know one or two languages well, they've never been interested in what else might be possible - maybe they never took a language survey course or they barely paid attention in that class - and so they genuinely do not know what else is possible or what might be normal in other languages. This happens to spoken languages too, in English "singular they" was already right there ready to be used for cases where we do not want to specify gender, in some languages there was never an issue here, gender was only ever an optional adjunct so just don't specify if you don't want to, while in others a default gender is so engrained into the language that you're basically fighting the assumption just to say a simple sentence. But if you only know English there's no reason you'd realise that varies.