3 ms·
I have wrapped my head around it. I think it's confusing to the reader and creates awkward semantics.
by vips7L 1y ago
I have wrapped my head around it. I think it's confusing to the reader and creates awkward semantics.
- vips7L 1y agoWhat I mean by that is this: val a: SomeType? = null // I’m forced to null check here if (a != null) { a.someMethodOnIt() } // But I don’t have to null check here a.someExtensionFn() It’s weird.
- izacus 1y agoYeah, extension functions are one of those features that went from 'oh, this is nice' to "this is so overused it's counterproductive". It makes reading a lot of Kotlin source quite terrible. Lately they've been shoveling a lot of similar magical "code comes from somewhere" features into a language, slowly giving it a C++ clutter type feel.