|
|
|
|
|
by lmm
3064 days ago
|
|
Definitely read using an IDE rather than a text editor if you weren't already. Scala is the first language I've seen to really make intelligent use of the GUI - not in a dragging-boxes-and-arrows way, but with implicits that are visible subtly (green underline, expandable by mousing over) but not there by default. The way I see it, it's a novel middle ground for things that you don't want to be completely invisible, but don't want taking up a lot of space either, e.g. error handling (exceptions are completely invisible, go-style explicit error handling is too verbose) or access to mutable state, or async operations, or... (the for/yield sugar is similar, with a lightweight "<-"/"=" distinction between effectful operations and not, and then you mouseover to see what the specific effect is). Working with inferred types is also easier when you can mouseover or hit a hotkey to get the type of any expression. Having different syntax for different kinds of effect as Kotlin does could be seen as more explicit I guess, but I find it actually makes it harder to work with - you have a lot more syntax to keep in your head, and you can't write generic code that works with multiple different effects. Other than that I don't think there's anything more explicit in Kotlin, and some things - error handling in particular - are definitely less explicit. |
|