3 ms·
I think it's the opposite. All languages have their own "implicits" - just not as a proper language concept, but for "special cases". The problem is, that whil
by valenterry 6y ago
I think it's the opposite.
All languages have their own "implicits" - just not as a proper language concept, but for "special cases". The problem is, that while it gives developers are more stable/clear framework to work with, it also limits the development of the language itself.
If you look at Scala, implicits could be used to model typeclasses from haskell and method-syntax-extension. Other languages such as Kotlin have a dedicated language feature for that. Scala never needed that.
However, this power also ask for responsible usage of course. That is a drawback that can't be denied.
- dwohnitmok 6y ago> implicits could be used to model typeclasses from haskell and method-syntax-extension To be fair those are powered by two different mechanisms (implicit arguments and implicit conversions) that just so happened to share the same keyword name but are semantically quite different (and have been broken up in Scala 3). But your overall point is well-taken.
- valenterry 6y ago> To be fair those are powered by two different mechanisms You can call it like that, but in the end it is the same language feature: describing things in a scope as implicit and having the compiler resolve them by certain rules. What happened in Scala 3 is just that they were named different to make clear when things get defined and when they get used - one without the other is useless though, hence to me it is the same concept or language feature.