Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The proposed OCaml implementation of modular implicits[1] considers ambiguity a compile-time error, so in that case you'd have to manually indicate which module you're passing in. (This is in contrast to Scala, in which there's an elaborate mechanism for resolving ambiguity in implicits which makes it hard to know which is being selected.)

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



the section "6.5 Modular type classes" was very interesting. Although they did mention some restrictions as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: