In Scala it's bad practice to use implicit parameters for summoning traits that aren't type classes. Not all traits required via implicit parameters are type classes, usage via "implicit" isn't what defines a type class, the trait's signature is. Stop using "implicit" for DI.
-
-
Reading code is more than being able to reason about fragments of it in isolation. That's important, of course, but unnecessary explicit parameters can also look a lot like boilerplate.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Seeing that a method interacts w/ the database, or can potentially fire missiles, is as important at the call-site, as its definition. And if we want context, if we want DI, Scala also has a true and tried way of doing it, which is OOP classes, closures on steroids.
-
Scala is an expressive language, but the aggregate of its features can yield some of the worst code in existence. Whenever I compare Scala APIs to their Java equivalents, I almost always find the Java version easier to read. And no feature was abused more than implicits.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
