4 ms·
Kotlin's features are amazing for designing DSLs but I think your code sample uses more than just the 3 points you mentioned. Specifically the `call.respondText
by zorr 4y ago
Kotlin's features are amazing for designing DSLs but I think your code sample uses more than just the 3 points you mentioned. Specifically the `call.respondText(..)` part. I assume that in this example the second argument to the `get` function is actually a "lambda with receiver", which means that the lambda executes with another object as the receiver (and that object is bound to "this" inside the lambda block), which makes the `call` object available.
- still_grokking 4y agoIsn't it cool that you can't know what the code is actually by just looking at it? /s Kotlin's scope injection is one of the most terrible "features" ever invented. It's dynamic scoping on steroids! But dynamic scoping was long ago deemed a horrible bug and never ever made it again into any new language.