Confusing scala day: when to mix in a trait vs when to import an object, when extending with a trait.
-
Show this thread
-
Or making a class the extends a trait vs importing an object
2 replies 0 retweets 0 likesShow this thread -
Replying to @mat4nier
The hardest thing about Scala is how high-dimensional its design space is. Without some kind of strong priors on what features to use, every decision leads to paralysis. (FWIW: I basically never mix in traits *or* import objects, and I bet you want a typeclass here :)
1 reply 0 retweets 1 like -
Replying to @avibryant
I’d love a type class here but co. Is very much oop shop. I do guerrilla fp when I can but typeclasses are a hard sell due to implicits
1 reply 0 retweets 0 likes -
Replying to @mat4nier
Ah, well then, all traits all the way, and make sure to throw a lot of Abstract and Factory in there.
2 replies 0 retweets 0 likes -
Replying to @avibryant
Noooooooooo. I see enough stuff named “ServiceLike” as it is!
1 reply 0 retweets 0 likes
Just ask yourself What Would Java Do?
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.