Open Daenyth opened 3 years ago
Linking this idea so we don't lose it: https://gitter.im/typelevel/cats-effect?at=5f91ac4bc990bb1c3924d794 I absolutely love this concept. Very creative use of implicits.
Is bm4 going to be available / necessary in dotty? If so, maybe we should go the ZIO way and define withFilter
as an IO that fails with some Throwable if the predicate doesn't hold.
Failing with a MatchError actually isn't the end of the world. It basically recreates pattern matching semantics (like val). It does oddly allow if statement as well though.
If we were to do that, I would want to make it available as syntax on all MonadThrow types as well, just for uniformity. And I'm still not convinced it's a good idea. 😃
But with that said, maybe it's better than nothing. Bm4 isn't available on Dotty and probably never will be.
Errors like
error: value withFilter is not a member of cats.effect.IO
are very confusing for newcomersAdd a FAQ entry which: