FAQ
Hi,

Probably I missed this discussion. Now as Promises becoming a standard,
what is the reason to not to support both, callback style and promises in
the core?

What I am looking for is a lib which can be required as a very first module
and will wrap every async node core function into a function which accepts
node style callbacks and returns Promise when no callback is passed.

If there is no such thing, are there people who would use it?

Best,
Oleg

http://github.com/kof
http://twitter.com/oleg008

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • // ravi at Apr 30, 2014 at 1:10 pm

    On Apr 30, 2014, at 6:31 AM, Oleg Slobodskoi wrote:

    Probably I missed this discussion. Now as Promises becoming a standard, what is the reason to not to support both, callback style and promises in the core?

    What I am looking for is a lib which can be required as a very first module and will wrap every async node core function into a function which accepts node style callbacks and returns Promise when no callback is passed.

    If there is no such thing, are there people who would use it?
    Q's node specific wrappers work for me. I'd have to wrap each node callback style call myself, but it's easy enough.

      --ravi


    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Oleg Slobodskoi at Apr 30, 2014 at 1:14 pm
    Thats the difference. Its actually possible to promisify the api without to loose backwards compatibility. Overhead is acceptable.
    On Apr 30, 2014, at 6:31 AM, Oleg Slobodskoi wrote:

    Probably I missed this discussion. Now as Promises becoming a standard, what is the reason to not to support both, callback style and promises in the core?

    What I am looking for is a lib which can be required as a very first module and will wrap every async node core function into a function which accepts node style callbacks and returns Promise when no callback is passed.

    If there is no such thing, are there people who would use it?
    Q's node specific wrappers work for me. I'd have to wrap each node callback style call myself, but it's easy enough.

    --ravi



    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • // ravi at Apr 30, 2014 at 1:29 pm

    On Apr 30, 2014, at 9:16 AM, Oleg Slobodskoi wrote:
    Thats the difference. Its actually possible to promisify the api without to loose backwards compatibility.

    True, but since most of the calls we make will be non-core, and since modules take their cue from node core, their APIs tend to be callback based and will need to be wrapped as well (if I want to go all promises, for consistency).

      --ravi

    Overhead is acceptable.
    On Apr 30, 2014, at 6:31 AM, Oleg Slobodskoi wrote:

    Probably I missed this discussion. Now as Promises becoming a standard, what is the reason to not to support both, callback style and promises in the core?

    What I am looking for is a lib which can be required as a very first module and will wrap every async node core function into a function which accepts node style callbacks and returns Promise when no callback is passed.

    If there is no such thing, are there people who would use it?
    Q's node specific wrappers work for me. I'd have to wrap each node callback style call myself, but it's easy enough.

    --ravi



    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedApr 30, '14 at 10:32a
activeApr 30, '14 at 1:29p
posts4
users2
websitenodejs.org
irc#node.js

2 users in discussion

// ravi: 2 posts Oleg Slobodskoi: 2 posts

People

Translate

site design / logo © 2021 Grokbase