Giter VIP home page Giter VIP logo

Comments (6)

jkrems avatar jkrems commented on June 10, 2024 1

This sounds like a pretty neat feature. Would be interesting to see how many things it would break but given that the old behavior is already deprecated..?

I definitely wrote multiple promisify in each source file I created today so it sounds like a great quality of life improvement to me. It might be a challenge to do it in a way that doesn't affect performance to badly. Maybe it would actually be easier to have a "promisified" interface of core shipping as separate entry points, either module- or function-wise? That would skip all callback checks immediately.

from ayo.

Fishrock123 avatar Fishrock123 commented on June 10, 2024 1

This is more-or-less requesting a port of nodejs/node#5020, which didn't land in Node at the time.

This sounds like a pretty neat feature. Would be interesting to see how many things it would break but given that the old behavior is already deprecated..?

None. The deprecation is not about the same thing.

@addaleax could you please update the title to reflect the request better?

from ayo.

hypesystem avatar hypesystem commented on June 10, 2024

If all that is blocking is user legacy code, it could potentially be shipped behind a flag (--promises-on-missing-callbacks). That would let us decide on whether to make it default behavior, depending on how many people still use the deprecated versions at some later point in the future.

I am a big fan of the idea, but I don't know how much the deprecated calls are in use, and how many libraries we would potentially break.

from ayo.

Fishrock123 avatar Fishrock123 commented on June 10, 2024

Could you please describe in more detail how this would work / what you are looking for?

from ayo.

addaleax avatar addaleax commented on June 10, 2024

@Fishrock123 I think this is about making fs.stat(filename) & friends return promises when no callback is passed

from ayo.

ddwwcruz avatar ddwwcruz commented on June 10, 2024

@Fishrock123 what @addaleax just described

from ayo.

Related Issues (20)

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.