On Sunday, August 18, 2013 2:36:47 PM UTC-6, Mark Hahn wrote:
>
> start = -> setTimeout cb1, 1000; console.log Date.now()
> cb1 = -> setTimeout cb2, 1000; console.log Date.now()
> cb2 = -> console.log Date.now()
>
> start()
>
> ... 

> Does anyone appreciate this pattern?  It is like the pattern described in 
> the blog in the OP.  And it *does* use coffeescript
>

As someone is somewhat familiar with JavaScript, but not an expert, & is 
familiar with CoffeeScript only passingly, I find this patter very easy to 
read & understand.  Reminds me of declaring all the variables at the 
beginning of a code block, but you're declaring ordered functions very 
neatly instead.  Callbacks are OK for me to read if the program/function is 
short, but can become unreadable unless one is very consistant in 
decoupling code.
Thanks for presenting your pattern.

-- 
-- 
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.

Reply via email to