News for hackers. Stuff that matters.
Re:Java record pattern matching in JDK 19 by _old_dude_ on Saturday May 14, 2022 @02:10PM (#31380671)
The same feature does not entail the same tradeoff depending on the languages.

For Kotlin, extensions methods are essential otherwise you can not extend existing Java types with Kotlin types.

For C#, you need extension methods for LINQ because modifying the .Net runtime was not an option at that time.

For Java, changing the VM is not an issue, instead of extension methods you add default methods which can be overridden by implementations.

Same feature, different tradeoffs.

There are no comments on this comment yet.