But, if these things aren't concerns, then there's really no reason to
add the extra complexity.
--i
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
I'm not sure if it is guaranteed for the built-in functions, but I
definitely found myself screwing the stack depth if I didn't use
process.nextTick, (if we had tail calls, then maybe it wouldn't be a
problem, I guess process.nextTick, is an explicit tail call), in the
functions I wrote.
I hadn't thought of the implications for the order-of-operations. But
I think you are correct, given the single-threaded, non-interrupted
nature of things, the expectation would be to see 'B, A' always.
Benno
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
>
--
Aaron
http://clickdummy.net
Yes. The only case I can think of for which that is not true is
array.forEach()...
> And if this is the case, is it also considered best practice if you
> write your own functions which take a callback as an argument to make
> sure that they are asynchronous.
Yes. If it's async most of the time - use nextTick to give users the
consistent interface.