Or maybe, Scala *does* make it easy to abstract over monad-like types (as Cats, Scalaz, Mercator, ... shows), but there are no monad/functor/... typeclasses in stdlib?
-
-
Replying to @adamwarski
It's the abstracting over that's the problem for Scala, rather than the use (which is great when the type is concretely known)... the main problem is that for-comprehensions allow more general types than can be easily represented by an OOP-style typeclass interface...
2 replies 0 retweets 0 likes -
Replying to @propensive
Adding a F[_]: Monad type constraint and a cats.implicits._ import, or defining the instance by implementing a trait is easy enough. The problem is there’s no standard way to do this, so libraries roll their (incompatible) own, or just avoid altogether
1 reply 0 retweets 4 likes -
Replying to @adamwarski
I think part of the problem is that a dependency on the whole of Cats or Scalaz, if all you want is a way to abstract over monad-like things, is too much... which is why people roll their own...
1 reply 0 retweets 1 like -
Replying to @propensive
This might be only a psychological barrier, I suspect cats might be one od the smaller dependencies (measuring in bytes). And no transitive ones, too
2 replies 0 retweets 3 likes -
Replying to @adamwarski @propensive
FWIW neither cats nor scalaz are very small. Last time I checked cats-core was something about 8mb, I suspect due to generated code
1 reply 0 retweets 0 likes -
2 replies 0 retweets 0 likes
-
Ah, I am mistaken then, thanks for checking :) it's still more than I initially thought
2 replies 0 retweets 1 like -
For comparison, Mercator is 13KB. ;)
0 replies 0 retweets 1 like -
This Tweet is unavailable.
Many years working on Rapture taught me something... ;)
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.