2 ms·
The same feature does not entail the same tradeoff depending on the languages. For Kotlin, extensions methods are essential otherwise you can not extend existi
by _old_dude_ 4y ago
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.