|
|
|
|
|
by rikkus
4080 days ago
|
|
Yes magic is one thing that makes it difficult to get into a language and to maintain code written in that language, where of course maintaining can mean going back to code you wrote last month. One of my pet hates in C++ was implicit casting and I'm hearing that Scala does similar, which is putting me off it. |
|
To my mind Scala is a very unmagic language; very complex libraries are written for it, but they're never magic, they're always ordinary Scala code and ordinary Scala features, just combined in clever ways. E.g. typeclasses are a language feature in Haskell, but in Scala they're just a pattern that you implement using implicit parameters. Actors and messages are a language feature in Erlang, but in Scala they're just a library with methods that you call. Type-level functions are a language feature in e.g. Idris, but in Scala (e.g. Shapeless) they're just a technique making use of implicit resolution.