Re:Kotlin 1.4
by agumonkey on Tuesday August 18, 2020 @09:13AM
(#24198153)
Any example ? or an idiom name I can google ?
[ Parent
| on HN ]
Groovy also does it. I have no idea what the name is though: https://mrhaki.blogspot.com/2009/11/groovy-goodness-passing-...
Not sure about the exact name. But kotlin also has "function with receiver" that together with this makes it very easy to write almost a custom domain language on top of kotlin.
Can't edit, but here's an explanation https://kotlinlang.org/docs/reference/type-safe-builders.htm...
Swift calls it trailing closure syntax