generated from legendecas/tc39-proposal
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyper Minimalistic Spec - Unopinionated Async Context #110
Comments
|
This seems it would violate the dynamic scoping constraints this proposal attempts to respect. See https://github.com/tc39/proposal-async-context/blob/master/SCOPING.md and some of the discussion at endojs/endo#1424 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am nobody and this is going to be a bit brutal lol π³οΈ Please bear with me π.
What if we remove almost everything from the proposal and keep the strict minimum when it comes to the API.
There is a lot of opinions about what should the feature look like.
But in reality, the only thing that is needed, to implement almost all proposed features, is a very simple API that should provide:
These two features alone allows to implement everything else. That will allow library developers to build their own API on top of it to satifies different kind of constraints, objectives or opinions.
Note: this would have advantage to have a zero performance cost on the native side (If I'm not mistaken), since the engine already knows where to forward errors in an async call, it could repurpose the same code to surface the current async context using getters from the JS land.
Note2: I refactored the polyfill I created to showcase exactly that: https://github.com/iliasbhal/simple-async-context
Let me know what you think π
The text was updated successfully, but these errors were encountered: