Comments (7)
I'm not sure what you mean; all the userland libraries have then
forever until they add this Symbol.
The intention isn't that a promise lib would ever add the symbol; it's that a non-promise lib could have a .then
method along with the Symbol.
If you mean that userland promise libs wouldn't respect the symbol; I'm pretty sure they'd all do it super rapidly considering that not doing so would make them broken wrt native Promises.
from proposal-symbol-thenable.
Since that wouldn't break old code, only new usages of old code (except for the hopefully super-rare case of resolving a promise with a Module namespace object), I don't anticipate that will cause problems in practice.
from proposal-symbol-thenable.
@gibson042 that's totally true! that simply means that the symbol itself won't be useful for defensively-written libraries across the wider ecosystem for awhile, until all the libs and engines support it - which is all the more reason to start that clock as soon as possible :-D
from proposal-symbol-thenable.
If you mean that userland promise libs wouldn't respect the symbol; I'm pretty sure they'd all do it super rapidly considering that not doing so would make them broken wrt native Promises.
Yes, that's the situation I'm talking about... the very same value (i.e., an object with both a then
method and a Symbol.thenable
property) would be treated as non-thenable by "new" consumers but thenable by today's consumers—some of which have quite long usage tails (e.g., people still open issues for five-year-old versions of jQuery).
from proposal-symbol-thenable.
hopefully people who think "i want to use this new symbol" also think "i realise this promise polyfill i downloaded five years ago doesn't know about this symbol so i'll need to update"
from proposal-symbol-thenable.
You can't assume that those groups of people are the same. Defensively-written libraries must avoid defining Promise-incompatible "then" methods, with or without a new symbol.
from proposal-symbol-thenable.
Closing, because this is viable from a userland perspective - or at least, this was nobody on the committee's concern.
from proposal-symbol-thenable.
Related Issues (7)
- Changing the then-method key HOT 5
- Pros/cons of symbol on object with then method vs on method HOT 7
- Performance implications HOT 2
- No need for Symbol to be visible on Module Namespace HOT 6
- How to use this with thenable objects? HOT 6
- Alternative Proposal: Extend `import` syntax to allow boxing of the module HOT 3
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 proposal-symbol-thenable.