Re:Towards Scala 3
by MrBuddyCasino on Friday April 20, 2018 @09:46AM
(#16884694)
If "<feature> is very powerful when used correctly, but terrible if not": think long and hard before adding to a language.
[ Parent
| on HN ]
Completely agreed. Implicits are the one place where Scala genuinely pushes the art of language design a bit beyond what's really possible; I expect future languages to come up with a better solution to the same problem. But in the meantime the things they enable - typeclasses, extension methods, the magnet pattern - are too valuable to do without, and we can't just sit around and wait for the perfect language to arrive.
I wouldn't want to have any more language features that pushed as hard as implicits do, but one somewhat-experimental feature in a language is ok, just about. I don't think Scala is a thousand-year language, but it strikes the best balance given the current state of the art.
Typeclasses: barely workable–if the implementor knows how to save the caller from paying the 'import tax'
Extension methods: too much potential for confusion
Magnet pattern: no idea what that is
Personally I feel OCaml strikes the best balance :-) But we may be arguing about an inch here rather than a mile.