5 ms·
Couldn't agree more if I tried. Scope functions are also great. And the syntactic sugar where `foo({ a -> a })` and `foo { a -> b }` are the same makes code s
by yuye 2y ago
Couldn't agree more if I tried.
Scope functions are also great.
And the syntactic sugar where `foo({ a -> a })` and `foo { a -> b }` are the same makes code so much more readable.
I've done Python for a project at a previous job for a few months and it made me realize just how awful Python is, especially because you can't chain functions on collections as easily as you can in Kotlin. I also made me realize that I don't like dynamically typed languages.
- MrBuddyCasino 2y ago> Scope functions are also great. They are useful but I'm not sure they carry their weight. I have to look up the differences often, maybe they're just terribly named?
- brabel 2y ago> And the syntactic sugar where `foo({ a -> a })` and `foo { a -> b }` are the same makes code so much more readable. That's 1-to-1 copied from Groovy by the way :)
- agumonkey 2y agoAlways strange how genes survived over time.
- hnben 2y ago> `foo({ a -> a })` and `foo { a -> b }` are the same I am new to kotlin, so I may be missing something obvious, but shouldn't it be "a->a" in the 2nd case, too?
- yuye 2y agoYou're right, my brain farted somewhere in the middle.