|
|
|
|
|
by ulrikrasmussen
1739 days ago
|
|
I wholeheartedly agree. Whether {} denotes a block or a lambda is context-dependent in the language I took these examples from (Kotlin). I think they adopted the syntax from Groovy. It is "useful" for creating DSLs because you can implement constructs like `.forEach` so they look like imperative constructs, e.g. list.forEach { x -> ... }
But it becomes harder to read code outside an IDE, especially if the implicit `it` construct is used. |
|