It's interesting that it isn't a consensus on whether it makes the code more or less readable to use those scope functions. I've found situation where it made sense to use them and definitely situations where it doesn't. The big value of the refactoring they made, to me, was the decoupling, not the readability, but readability is so intrinsically connected to familiarity with the code base, the language and the common standards that I don't see this as a bad thing, inherently. I wonder if the kotlin compiler yields the same bytecode in the end, inlining those extra functions and lambdas...
@@hkupty yeah the bytecode is the same. Although I'm not sure about non-jvm platforms, especially when creating a standalone binary. Kotlin's goal is to be readable, and most of the times those scope functions are abused. I'm OK on using them when initializing a property, for example, so that I clearly see what's going on in that block.
Fun to watch
Very nice talk! Thanks for sharing.
That definitely was the most excruciating rename of a simple function that wasn’t even necessary in the first place.
at least it was not put into a separate module with abstraction following all the best practices/industry standards of clean architecture
It's great for hourly contractors. Adding this to my toolbox for sure. 🙂
You wasted my time a little bit 🤕 (Renaming)
❌❌❌Waste of time. Just don't watch this.
I always *beg* my fellow devs not to use also, apply, let (or other scope functions). They make the code a PITA to read.
It's interesting that it isn't a consensus on whether it makes the code more or less readable to use those scope functions. I've found situation where it made sense to use them and definitely situations where it doesn't. The big value of the refactoring they made, to me, was the decoupling, not the readability, but readability is so intrinsically connected to familiarity with the code base, the language and the common standards that I don't see this as a bad thing, inherently. I wonder if the kotlin compiler yields the same bytecode in the end, inlining those extra functions and lambdas...
@@hkupty yeah the bytecode is the same. Although I'm not sure about non-jvm platforms, especially when creating a standalone binary.
Kotlin's goal is to be readable, and most of the times those scope functions are abused. I'm OK on using them when initializing a property, for example, so that I clearly see what's going on in that block.
@@lppedd If it's bad on non-JVM platforms, that's definitely a missing optimization and should be reported
Interestingly I find let very confusing by I like with, apply, and especially also