Mark, I think the point everyone is trying to make is that with regular
JavaScript, this "start()" thing is *not* necessary, but with CoffeeScript
it is... essentially, this "start()" mechanism is a hack for CS's lack of
function hoisting.


On Sun, Aug 18, 2013 at 1:36 PM, Mark Hahn <m...@reevuit.com> wrote:

> Yes, I know it isn't hoisting.  I never claimed it was.  I'm just saying
> (over and over) that callbacks can call the functions while going downwards
> in the file.  This is how I code everything.
>
> Here is a more detailed example.  Note how readable it is when the control
> flows downward, just like synchronous code.
>
> start = -> setTimeout cb1, 1000; console.log Date.now()
> cb1 = -> setTimeout cb2, 1000; console.log Date.now()
> cb2 = -> console.log Date.now()
>
> start()
>
> Everyone is still telling me it won't work, isn't hoisting, or something,
> which has nothing to do with what I'm saying.  As long as you all keep
> doing this I'm going to keep trying to get my point across.
>
> Does anyone appreciate this pattern?  It is like the pattern described in
> the blog in the OP.  And it *does* use coffeescript.
>
>  --
> --
> 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.

Reply via email to