Re:Java 20: A Sneak Peek on the Panama FFM API
by oaiey on Thursday December 08, 2022 @05:16PM
(#33914474)
I posted that in parallel. C# tries to be both, a system and application language. Java does not try that. Therefore, they can skip all the memory related topics quite quickly. And that wades out like 80% of the average joe unused features.
Re:Java 20: A Sneak Peek on the Panama FFM API
by za3faran on Thursday December 08, 2022 @01:31PM
(#33911316)
> and will likely help us avoid adding named and default parameters as a separate feature
Very cool. Is there any material available about this for further reading?
Re:Java 20: A Sneak Peek on the Panama FFM API
by pron on Thursday December 08, 2022 @04:58PM
(#33914201)
Not really, except for speculation on my part on how we might end up doing it: https://old.reddit.com/r/java/comments/siv00z/named_and_opti...
That would be the case for pretty much any language that has lots of features (provided that most of those features aren't completely terrible). A good design (at least for a mainstream language) also strives to minimise the number of features, not adding everything you can but only adding things you absolutely need. In the case of C#, many of its features are not widely adopted, and Java in particular will never adopt them.
Java's philosophy has always been to wrap an innovative runtime in a conservative language that only adds features late, after they've proven their worth elsewhere and when most mainstream programmers are ready for them, with the realisation that every added feature adds a cost to learning the language. That strategy has worked very well for Java, but .NET has a different strategy (a more adventurous language built on top of a less adventurous runtime). We'd rather spend two years thinking about how to avoid adding a new language feature than spend six months adding it. This "last-mover" strategy has helped us maintain our philosophy and keep the number of features small compared to C#. We strive to only add features that have a big bang-for-the buck and that, preferably, solve many problems at once, rather than add many features, each addressing a relatively small problem. For example, virtual threads have allowed us to avoid adopting async/await; records are allowing us to avoid adopting properties, and will likely help us avoid adding named and default parameters as a separate feature (which, in languages like C#, Swift, and Kotlin breaks binary compatibility/separate compilation).