|
|
|
|
|
by zorr
1263 days 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. |
|
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.