Comments (5)
The semantics of accept
and resolve
are different, and accept
is the lower-level variant. It sounds like your suggestion is to give accept
(now fulfill
) the resolve
semantics and move the accept
semantics to finalAccept
?
I'm not sure what that buys us. There is active disagreement about weather or not programmers should use accept
or resolve
, and removing one or the other is hostile to at least one camp.
from promises.
When would a user ever need to invoke fulfill
directly? Shouldn't users always invoke resolve
?
from promises.
@cowwoc the semantics are different - resolve
will unwrap/resolve promises passed as the value whereas fulfill
just blindly takes the value it's given and passes it along.
// Directly resolves the Promise with the passed value
void fulfill(optional any value);
// Indirectly resolves the Promise, chaining any passed Promise's resolution
void resolve(optional any value);
from promises.
So you're saying fulfill() causes the promise to override any values returned by subsequent chains? Why/when when you want to do that?
from promises.
Why/when when you want to do that?
see #53 (and i think #26 as well and maybe another or maybe it was in various other places) - a lot of ground has already been covered in those tickets.
from promises.
Related Issues (20)
- handleEvent support HOT 2
- IDBTransaction should become a Future as well HOT 1
- Not installable via npm HOT 7
- A proposal for ending the wrapping/unwrapping war. HOT 23
- Typo in error message
- Please tag releases HOT 3
- Clean up exception stack-traces HOT 2
- Throwing an exception inside a Future HOT 2
- "catch" is a reserved word HOT 5
- No practical way to handle uncaught exception HOT 5
- Let's resolver return a dispose function HOT 3
- .catch() prevents .then() from getting executed
- [polyfill] Add ability to use Promises for core node functions HOT 2
- Renaming accept-fulfill and future-promise in documentation HOT 1
- Switch any/every/some to arrays instead of varargs HOT 4
- Are DOM Promises intended to be inherited from in user code? HOT 10
- Promise constructor takes function not object
- Failures get swallowed and lost. HOT 3
- Promises polyfill should not override native Promises 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 promises.