597 reputation
418
bio website shovon.github.com
location Delta, BC, Canada
age 23
visits member for 3 years, 2 months
seen Apr 14 at 22:41

Mar
23
awarded  Popular Question
Feb
19
awarded  Notable Question
Mar
19
comment CoffeeScript and Named Functions
Sure at the technical level foo = -> represents a variable referring to an anonymous function, but I don't see that as your job for explaining the low-levels of a higher level idea.
Mar
19
comment CoffeeScript and Named Functions
jelivs: no problem. One correction from the last comment I wrote on your answer: your class foo's function body will not be hoisted to the top of the file.
Mar
19
comment CoffeeScript and Named Functions
I could look at it analogously to CoffeeScript: foo = -> is just a plain old function, whilst class Foo is a constructor. I see no reason why foo = -> should strictly be called anonymous.
Mar
19
comment CoffeeScript and Named Functions
For the small pool of programmers that I talk to (outside of programmers.SE that is), they mostly say to use JavaScript's named functions for use as "classes" (constructors), while anonymous functions stored in variables for plain old functions.
Mar
19
comment CoffeeScript and Named Functions
And also, there's a technical caveat: your foo function's body will not be hoisted.
Mar
19
comment CoffeeScript and Named Functions
It's true that there isn't such a thing as a function foo () {}. However, you can still initialize a named function via the class construct. Just that the compiled CoffeeScript (the resulting JavaScript) is much more verbose than how most would write a named function.
Mar
19
revised CoffeeScript and Named Functions
deleted 1 characters in body
Mar
19
revised CoffeeScript and Named Functions
deleted 3 characters in body
Mar
19
answered CoffeeScript and Named Functions
Feb
13
awarded  Yearling
Nov
13
awarded  Popular Question
Oct
18
awarded  Good Question
May
2
accepted Is it an absolute must that we ignore/delete all compiled files before committing?
May
2
asked Is it an absolute must that we ignore/delete all compiled files before committing?
Apr
11
awarded  Popular Question
Feb
13
awarded  Yearling
Feb
8
awarded  Nice Question
Nov
2
accepted When you should and should not use the 'new' keyword?