No implicits

27 views
Skip to first unread message

Haprian Vlad

unread,
Aug 14, 2014, 12:58:17 PM8/14/14
to spire...@googlegroups.com
Hey, could anyone explain why noImplicits are usefull ?

Tom Switzer

unread,
Aug 14, 2014, 1:30:30 PM8/14/14
to Haprian Vlad, Spire User List
Because sometimes it works around otherwise ambiguous implicits. Scala's implicit prioritization mechanism covers 90% of cases, but occasionally you hit times where you have an ambiguous implicit and cannot work around it using the trait-inheritance trick or by making one implicit more specific, so you use no-implicit to disable one of the implicits if some other ambiguous implicit can also cover it.
Reply all
Reply to author
Forward
0 new messages