5 ms·
> what possible reason do you think they have to do something that to you seems so obviously wrong? We are all human. That's the main reason. That's why inst
by dmitriid 4y ago
> what possible reason do you think they have to do something that to you seems so obviously wrong?
We are all human. That's the main reason.
That's why instead of a unified way of creating collections (and lists and arrays) you need to manually write out `.of` methods and hope that the authors of the library that provides collections (whether built-in or external) provided those methods.
That's why instead of a unified way of creating objects you need tedious manual builder patterns, manual getter/setter boilerplate or code generation.
That's why <hundreds of low-hanging fruit for DX>
That's why the proposal couldn't re-use existing language features (like C# did in the first approach, and as is acknowledged in the proposal).
So you will end up with what is essentially an object initialisation syntax... but only available in this one construct. And will then spend another five years trying to bring it to the rest of the language, again in a very limited capacity. Because something something "conservative language" and "less successful languages".
> Moreover, why do you conclude that propertied are the only right choice
I did not conclude that.
- pron 4y ago> We are all human. That's the main reason. Surely you see that those who have come to the opposite conclusion can be equally convinced that it is you who has made what seems to them an obvious mistake for the very same reason. If we're honest, we should acknowledge that since there is no actual empirical evidence showing one way is superior to the other here, and since experts have come down on both sides, then there's probably a strong aesthetic component, in which case it makes for a language to remain true to the aesthetic principles that have proven successful for that particular language. > Because something something "conservative language" and "less successful languages". You keep missing the point about the "less successful languages." All of Java's features come from less successful languages. I was merely saying that the fact that some languages have a feature is not a reason to adopt it. It's just that if that language was doing better than Java, then there would at least be some social merit to the argument "you should do it because they do", but otherwise it's not an argument at all because other languages don't do it, so there's simply no guidance there. "You should do it because some people really want it" is similarly unhelpful because whatever "it" is, there's usually a similar number of people who want the exact opposite, and just as insistently. That is why different languages end up making different choices. Neither of these is an argument at all. All they mean is that other options exist, but they don't help choosing among them. That some languages do one thing and others do another, that some programmers want one thing and others want the opposite is a given. Now, from my personal perspective, the uniformity and power you want are better served by ADTs than by properties, it's just that you haven't appreciated the extent of the power that ADTs bring when used as intended (it's not really a distinctly separate construct), nor appreciated the significant downsides that properties bring along with their benefits, that are quite measly in comparison to ADTs. Then again, there clearly is no consensus on this, just as there is no consensus on just about anything, and whatever choice is made, some will be unhappy. Some other things you want may well end up being features in Java, it's just that we believe other things take priority. As for those that won't, our desire to minimise language features if we can help it may be a purely aesthetic choice, but it's one that's worked well for us (just as the opposite may work well for other languages). Without any good evidence that we should abandon it, the fact that some languages don't share our aesthetics is surely not a sufficient reason to abandon it.