5 ms·
Kotlin’s closed/final by default is a huge flaw when working with a large codebase. Code is not left extensible by default. I don’t want to sprinkle my code wit
by astral303 5y ago
Kotlin’s closed/final by default is a huge flaw when working with a large codebase. Code is not left extensible by default. I don’t want to sprinkle my code with the open noise. False performance optimization, big maintenance/flexibility expense.
- anoncake 5y agoThat is not a performance optimization.
- garethrowlands 5y agoIt's not a performance optimisation, it's to avoid codebases accidentally becoming a big ball of mud. Prefer composition over inheritance. Definitely do not inherit accidentally or from a class that wasn't designed for inheritance. The JVM can already optimise classes with no subclasses because it knows all the classes that are currently loaded, so it doesn't need language support.