the term "Callback" in node is very bound to "function will be called after
async call is done". In general a callback is an instance of the Observer
pattern, which is in fact a variant of the Delegate pattern. and the
function you pass to the forEach is in fact a Delegate or you could call it
Strategy pattern. the difference is in the semantics.
So in node context, callbacks are things called by async functions. bei
forEach its a delegate, be map it's a transform functions, bei filter, it's
filter rule etc.
Am Freitag, 12. April 2013 12:21:45 UTC+2 schrieb Tim Oxley:
>
>
>
> On Tuesday, 9 April 2013 23:56:44 UTC-4, Raynos wrote:
>>
>> @Eldar, that's an iterator function not a callback. A callback is very
>> specifically a function (err, value) {} that will not be called
>> synchronously.
>>
>>
> I've never heard a callback being "very specifically not synchronous"? Are
> you recommending only using function(err, value) pattern for async
> operations?
>
--
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.