From: inimino <inim...@inimino.org>
Date: Mon, 01 Feb 2010 16:22:07 -0700
Local: Mon, Feb 1 2010 6:22 pm
Subject: Re: [nodejs] Re: Promises, callbacks, Continuables and more
On 2010-02-01 14:51, Jan Sch tze wrote:
> 2010/2/1 Felix Geisend rfer <fe...@debuggable.com>: One issue with most of the suggestions I've seen for this >> * Having a single callback for both error/success > +1 > This has the advantage that you don't have to write the logic for so far is that they require type testing to distinguish success or failure. If you're going to have a single callback, make it In Felix's[1] example: function loadConfig() { } [1]: https://gist.github.com/85c313e588a3fc9d8636 This works only until you need to return undefined, (or 0, I like to use values which are either [0,<error>] or [1,<data>], function loadConfig() { } [2]: https://gist.github.com/67cbf71c79fd5b6bf3a1 Or if you prefer separate arguments, make the first indicate function loadConfig() { } -- http://inimino.org/~inimino/blog/ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||