Coder Social home page Coder Social logo

Comments (7)

Thomvis avatar Thomvis commented on August 27, 2024

I think we should consider this together with using https://github.com/antitypical/Result.

It is counter productive for every library to have its own Box/Result/Queue/etc. implementation. On the other side, by adding dependencies (BrightFutures currently has none), the library may become less accessible.

I don't know what the right thing to do is yet and would love to hear what other people think.

from brightfutures.

nvh avatar nvh commented on August 27, 2024

I totally agree. You want as few dependencies as possible (preferably none), but for people not using other frameworks for Box/Result, etc, it's so few code that I can't see any reasonable complaints of adding those dependencies. For people that are using Box and Result in other places, it's nice to have one implementation that most libraries reference, and for now my bet is on @robrix's frameworks.

Today I wrote a conversion between BrightFutures.Box and Box.Box and BrightFutures.Result and Result.Result, and it felt kind of weird and something I'd rather not handle with.

BTW: The only dependency would be Result, because that has a dependency on Box itself.

from brightfutures.

robrix avatar robrix commented on August 27, 2024

FWIW, we removed Result’s dependency on Box.framework, but decided to re-add it to ease its integration into ReactiveCocoa 3.0 (and to recover some lost expressiveness around pattern matching).

My personal take is that the broader community will become more comfortable with dependencies primarily by their use; and that µframeworks provide an optimal balance since quantity of dependencies does not pose a difficulty to maintenance, while surface area, which they minimize, does.

I think this is a good direction for BrightFutures to move in; and I’m glad to have learned of its existence!

from brightfutures.

zenkimoto avatar zenkimoto commented on August 27, 2024

👍 +1 on using https://github.com/antitypical/Result

I was thinking of mentioning this too.

from brightfutures.

larslockefeer avatar larslockefeer commented on August 27, 2024

If we do this, could we then also have Future<Value, Error> instead of Future<Value, NSError>? This would allow us to use context-specific error types without subclassing NSError, for more semantical code.

from brightfutures.

Thomvis avatar Thomvis commented on August 27, 2024

@larslockefeer I agree! I will merge #49 and then try to extend the approach with the custom error type

from brightfutures.

Thomvis avatar Thomvis commented on August 27, 2024

BrightFutures 2.0 has been released, which resolves this issue.

from brightfutures.

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.