News for hackers. Stuff that matters.
Re:Metals with Scala 3 by dwohnitmok on Thursday February 04, 2021 @08:26PM (#26031972)
FWIW I think that typeclasses are actually a prime example of what Scala 2's implicits were meant to enable from very early on rather than abuse of them (I know that e.g. the `Ordering` typeclass was at least in Scala 2.9 maybe earlier and context bounds to emulate typeclass syntax were in Scala 2.8).

But I do think your example of typeclasses is a great one. It's a good example of an FP concept (typeclasses thought of as logical constraints to a type variable) desugaring into an OO one (additional implicit arguments).

Re:Metals with Scala 3 by cheriot on Thursday February 04, 2021 @08:34PM (#26032029)
Fair point, although I'm not sure I'd call implicit function parameters an OO concept.

Regardless, scala3 will make that conversation so much simpler http://dotty.epfl.ch/docs/reference/contextual/type-classes....

Re:Metals with Scala 3 by dwohnitmok on Thursday February 04, 2021 @08:42PM (#26032082)
> implicit function parameters an OO concept.

True enough that implicitness is not an OO concept in and of itself (I think that was the operative word you're focusing on), but I do think it's the first thing that comes to mind if you're thinking in an OO manner. (Ugh... I keep needing to thread this parameter around... oh I know I could just use this DI library to implicitly insert this parameter for me!)