-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Scope functions are very important to the readability of Kotlin as they can change the context or introduce a variable without much fanfare. I would recommend that we highlight scope functions similar to a when block. This should include all the obvious scope functions (also, apply, let, run, and with). I also think it should include other methods that introduce a scope (e.g. forEach)
foo.apply { // apply should be highlighted
bar().forEach { // forEach should be highlighted
// ...
}
addListener("click") { // No special highlight
// ...
}
}It looks like GitHub's highlighter already highlights apply.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels