Git Product home page Git Product logo

Comments (6)

julienw avatar julienw commented on May 23, 2024

TBH I like the feature but I don't like the name ;) methods with a callback are not only happening in the node world ;)

I don't have a good proposal though.

(no comment on the suggestions themselves as I don't know your lib good enough)

from asynquence.

getify avatar getify commented on May 23, 2024

methods with a callback are not only happening in the node world

Of course. But the specific callback format cb( err, ...) is pretty strongly known as "node-style callbacks" in modern JS. Handling normal callback taking methods (that is, not in this specific format) are already easily possible without any additions:

ASQ(function(done){ setTimeout(done,1000); }) ...

But yeah, the name sucks. I just haven't come up with anything better yet. :)

from asynquence.

getify avatar getify commented on May 23, 2024

So far, the leading suggestion IMO is "error-first callback" for the name of this style of callbacks.

Should the API name be "efcb" or "efcallback" or "errfirstcb" or "errfirst" or "efback" or "efstyle" or...?

from asynquence.

getify avatar getify commented on May 23, 2024

I kinda like "efirst" or "efback" the most. [edit] actually, I like "efcall" the best so far. [edit #2] I think I've decided on "efcall".

from asynquence.

JedWatson avatar JedWatson commented on May 23, 2024

I'd put my vote on errcb. Because it's an error-first callback, imo the 'first' part is obvious enough because of the strong convention (can't remember the last time I saw a callback that accepted an err argument and didn't put it first)

from asynquence.

getify avatar getify commented on May 23, 2024

I settled on errfcb and errfcb().

from asynquence.

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.