Git Product home page Git Product logo

Comments (2)

djspiewak avatar djspiewak commented on May 21, 2024

Relaxing the laws of the effects4s Async (or at least, relaxing the stack-safety constraint) does indeed make this possible, so it just comes down to exactly what we want here.

I have a couple concerns:

  • This would add another dependency to cats-effect, and indeed everything downstream, which is a bit of a significant load to take on. The bar for stability on effects4s would indeed be extremely high, and given the comparatively large number of typeclasses in the library, I'm concerned on that front.
    • We could potentially mitigate this using "provided", basically opening the door for downstream projects to ignore effect4s if they so choose, or if they need the conversions, bring in the dependency explicitly.
  • If the point of effects4s is interop, why do we need more than just Async?
    • As a sidebar, I find it pretty unlikely that you'll be able to define a useful set of laws which simultaneously characterize lazy effect types (like Task or IO) and eager, memoizing containers like Future, but I admit that would be quite cool
  • I'm not particularly fond of unsafeExtractTrySync, since it forces you to provide two handlers. Effectively, it's like the inconvenience of both the synchronous and the asynchronous extractors, all in one.

from cats-effect.

alexandru avatar alexandru commented on May 21, 2024

I've thought more about it today - currently not very enthusiastic about this. Closing this issue for now and I'm postponing further development, because I'm behind on Monix, cats-effect is currently more exciting, etc.

We could potentially mitigate this using "provided"

Does this work? It would be awesome if it did, but I tried doing this with cats-core by means of macros (to avoid bytecode signatures that would trigger ClassNotFoundException), but whenever a compiler error happens, it starts triggering really nasty exceptions -- so when the compiler doesn't find some method you want to call on a type, it probably starts looking for implicit conversions, which triggers those macros, which then trigger classpath errors.

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.