Many years ago I used to write functions that *almost* always returned promises, except when they didn't. And I thought it was great, and efficient. I just needed to "lift" the values of a *possible promises* into an actual promises using something like Q.when. This works wonderfully, until you hit an exception in one of your zalgo-promise functions. This occurs before the promise chain has a chance to wrap and catch, so you're pretty well screwed.
Which means you have to wrap pretty much any zalgo-promise, or use some goofy apply mechanism. Assuming you meticulously add all this boilerplate then yes, at this point Juraj is right. It "solves" the problem (with a nextTick or equivalent, of course). But at what cost? On Fri, Aug 30, 2013 at 8:42 AM, Scott González <scott.gonza...@gmail.com>wrote: > On Fri, Aug 30, 2013 at 8:30 AM, Juraj Kirchheim <back2...@gmail.com>wrote: > >> Calm your tone. It's not a lie. It's just something that you seem not >> to understand. >> If you actually care for an explanation, I will be glad to give you one. >> But if you're just into screaming "lie" at things that you cannot >> grasp, then I will spare both of us a further waste of time. > > > I fail to see where I screamed. I simply stated a fact (I've been bitten > by this exact problem with promises before). Please, explain how promises > solve this. > > -- > -- > 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+unsubscr...@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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.