|
|
|
|
|
by platz
4073 days ago
|
|
More power in terms of flexibility, but the mechanism of implicits makes it less clear which instance is in scope for a given expression. With true typeclasses, there is no ambiguity which instance will be selected (there can only be one) This distinction is often lost when comparing true type classes with their emulation via implicts. Sometimes "more power" is not what you want i.e. this is more of a tradeoff. |
|
So the OCaml implementation shouldn't make it any more difficult to discover which implicit is in use in a given context, because if an implicit is used, then it must necessarily be unique and there will be no ambiguity.
[1]: http://www.lpw25.net/ml2014.pdf