Sorry, one more time: https://gist.github.com/tim-smart/6290338
A simple state object makes a heap of difference in terms of code nesting. I'm not too sure if it has performance implications. On 21 August 2013 16:28, Tim Smart <t...@fostle.com> wrote: > One other rule that I use a lot, is a state object: > > > > On 21 August 2013 07:11, Mark Hahn <m...@reevuit.com> wrote: >> We are down to just opinions so I'll shut up now. >> >> On Tue, Aug 20, 2013 at 11:57 AM, Andrew Kelley <superjo...@gmail.com> >> wrote: >>> >>> I'm not going to remove mention of the fact that coffee-script does not >>> support function hoisting, which is the main suggestion of the style guide. >>> Your "only algorithm change" destroys the ability to put "synchronous code" >>> first, followed by purely a list of function declarations, which is the very >>> thing the article is talking about. This is a simple provable fact. I'm >>> confused as to why you are arguing about something that is so logically >>> obvious. >>> >>> On Tuesday, August 20, 2013 2:47:57 PM UTC-4, Mark Hahn wrote: >>>> >>>> > I meant to show that applying this pattern without knowing what it >>>> > actually does can lead to cases where it simply doesn't work. >>>> >>>> Of course if someone doesn't apply the pattern correctly it won't work. >>>> This is true for all patterns. There is nothing inherently dangerous about >>>> this one. >>>> >>>> I don't know why people have negative opinions about something simple >>>> that makes code readable. Maybe it is a bias against coffeescript in >>>> general. >>>> >>>> I am still of the strong opinion that the blog linked in the OP should be >>>> edited to remove the claim that coffeescript can't implement the pattern. >>>> I >>>> defy anyone to show me some javascript code for that pattern that I can't >>>> convert to coffeescript with the only algorithm change being to add a start >>>> call at the bottom. That call does not negate any advantages of the blog's >>>> 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 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. -- -- 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.