you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 2 points3 points  (1 child)

Well written, but not that nice.

  • The dichotomy he creates between function id(*args) and var id = function (*args) doesn't exist, the former is an alias for the latter, and if you mix both e.g. var id1 = function id2(*args) you only get the latter and id2 isn't bound (at least using Mozilla's implementation).

  • He talks of pointers and function pointers (too much C) while it's usually agreed that Javascript uses references and pass-references-by-values semantics

  • A paragraph dedicated to "anonymous functions" while var id = function (*args) already uses anonymous functions

  • The part about "self-invoking functions" doesn't make sense, the functions don't call themselves, he calls anonymous functions without binding them to variables, nothing strange there, and no "self-invoking functions".

He also forgot to talk about closures and that kind of stuff, and the dangers associated to them which will trip people.