Comments (6)
Using SubscriptionIterator
is much better. In my mini-effection
spike I opted for the following naming, which is another decent option, IMO.
Subscription
->OperationIterator
Subsribable
->OperationIterable
ChainableSubscription
->Subscription
ChainableSubscribable
->Subscribable
(I didn't actually implement this)
from effection.
Subscription -> OperationIterator
If we make the type of Operation recursive, then an "OperationIterator" is really just another type of operation?
type Operation<T> = Promise<T> | Iterator<Operation<unknown>, T>
from effection.
@cowboyd I don't think so, the same way that AsyncIterator<T> != Iterator<Promise<T>>
, an OperationIterator is not quite an iterator over operations.
from effection.
I agree, but that's why I think exploring a different nomenclature is warranted. The sentence "an AsyncIterator is not an iterator over promises" is not confusing, whereas the sentence "An OperationIterator is not an iterator over operations" is.
from effection.
Ahh, I see, that's true.
EffectionIterator
and EffectionIterable
would be other options which might make sense?
from effection.
What's our equivalent of Async
here? Effect
? EffectIterator
?
from effection.
Related Issues (20)
- Cannot catch errors raised from inside Resource.init() operation
- Deprecate resolutions
- Should Stream and WritableStream have an operational send? HOT 2
- Add guide on working with Effection and TypeScript HOT 5
- Add equivalent to `ensure` which runs on error HOT 1
- Add `AbortSignal` resource HOT 6
- Confusion in docs on setting function name as label HOT 2
- Update @effection/fetch to depend on `cross-fetch ^3.1.5`
- Future<T> type improvements HOT 2
- Use `name` label in effection stack trace
- Typo in collections documentation HOT 2
- How production-ready Effection is? HOT 2
- Include a portion of process output in a failed `process.expect()` HOT 3
- Exception has occurred: Error: halted HOT 5
- Adding Effection backtrace to `DOMException` results in an error that cannot be read HOT 1
- Revamp `Subscription`, `Stream` APIs to make combinators easy HOT 4
- Add `iterate()` helper to drive stream iteration that is fully integrated with program structure. HOT 1
- Composable stream combinators HOT 1
- Update v3 docs to have feature parity with v2 docs
- implement `ensure()` for v3 HOT 1
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 effection.