Comments (7)
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.
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.
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.
👍 +1 on using https://github.com/antitypical/Result
I was thinking of mentioning this too.
from brightfutures.
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.
@larslockefeer I agree! I will merge #49 and then try to extend the approach with the custom error type
from brightfutures.
BrightFutures 2.0 has been released, which resolves this issue.
from brightfutures.
Related Issues (20)
- Swift4: build failure HOT 1
- Failed when compiling Bitcode HOT 1
- Promise chaining in BrightFutures using flatMap HOT 3
- Compile error on Xcode 9.3 beta 3 HOT 2
- Swift 4.1 support release HOT 2
- Swift 4.1 Crashes HOT 3
- Generic parameter 'T' could not be inferred HOT 1
- Compile error with XCode 9.3 / Swift 3.3 HOT 1
- Developers in danger!
- Update to Result 4.0.0 (or not) HOT 2
- Conflict with seconds and milliseconds shortcuts HOT 7
- Carthage issue with Result version choosing HOT 2
- Crash app when execute many times Future objects HOT 5
- Synchronous resolution of Futures HOT 2
- High crash rate after upgrade to Xcode 10 HOT 3
- Update to Result -> 4
- Support Swift 5 HOT 2
- Apparent dealloc error after Swift 5/Xcode 10.3 upgrade HOT 10
- 8.0.1 not available on Cocoapods
- No option to throw an error inside map HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brightfutures.