Giter Club home page Giter Club logo

Comments (7)

ljharb avatar ljharb commented on May 18, 2024 1

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.

ljharb avatar ljharb commented on May 18, 2024 1

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.

ljharb avatar ljharb commented on May 18, 2024 1

@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.

gibson042 avatar gibson042 commented on May 18, 2024

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.

devsnek avatar devsnek commented on May 18, 2024

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.

gibson042 avatar gibson042 commented on May 18, 2024

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.

ljharb avatar ljharb commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.