Git Product home page Git Product logo

Comments (4)

djspiewak avatar djspiewak commented on May 18, 2024 1

Alright, I'll PR ensuring (probably under some other name) to ApplicativeError in cats-core. Once that's in, I'll remove it here.

On the broader topic of discoverability vs implicits… I think that's a dichotomy that we should really figure out how to solve in the tooling layer, and trying to contort our implementations to resolve it seems… incorrect. So whenever it makes sense, removing stuff from IO and letting the typelcasses do the heavy lifting should be our policy. The exceptions should be primarily in the areas of efficiency (i.e. where we can get a better-than-default implementation by specializing). If we specialize a function, we can just put it concretely on IO and delegate from the typeclass instance.

from cats-effect.

alexandru avatar alexandru commented on May 18, 2024

If the intent is to keep IO minimal, delegating its functionality to Cats' type-classes, then yes, it makes sense to push that into MonadError.

from cats-effect.

rossabaker avatar rossabaker commented on May 18, 2024

At the risk of widening this discussion, I'd like to come to a consensus on "keep IO minimal and teach everyone to import cats.implicits._" vs. "make a more discoverable IO and be sad about the redundancies."

from cats-effect.

alexandru avatar alexandru commented on May 18, 2024

I think that import cats.implicits._ is fine, because this is meant to be deeply integrated into and piggyback on Cats.

I'm a little selfish, but the reason for why I want this is because I feel that Cats has missing type-classes, or type-classes with incorrectly used operations and pushing more responsability on Cats' type-classes will make Cats-core better.

For example I discovered that ApplicativeError.catchNonFatal is not being overridden for type-classes that might implement it lazily, like in cats.Eval, making it next to useless, even though it is being promoted as a lazy Applicative.pure.

from cats-effect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.