I agree. I think "Python-style comments" would be just as reasonable a term. My impression was that the comment I was responding to was objecting on historical grounds, since Ruby and Python borrowed that comment style from Perl, which in turn borrowed it from shell scripts.
I agree. Also they aren't using 1TBS for the code examples, and that will naturally lead to noob javascript programmers running into trouble when they inevitably type
return
{
hello:"world"
}
using 1TBS will naturally lead the programmer to type the correct javascript syntax
return {
hello:"world"
}
1TBS is naturally a better fit for javascript programming.
I have a strong reason to suspect that this was written by an intern who was relatively new to the language. It seems to be written by someone in the C/C++/Java mindset (ie how they didn't list "function" as a primitive data type)
Function is not a separate data type in JavaScript, but they could probably list Object there (EcmaScript defines 6 types and 5 primitive values, I can't really find any definition of "primitive type")
28 comments
[ 13.1 ms ] story [ 1043 ms ] threadhttp://www.youtube.com/watch?v=hQVTIJBZook
I guess Crockford is like K&R for JS's conventions.
http://developer.apple.com/library/mac/documentation/Scripti...
http://www.scribd.com/doc/50406482/Hacker-News-Integrates-Wi...
> operator to create an object, you should delete objects when you are finished withthem, like this:
> delete myObjectVariable;
What a bunch of crap? Have these guys even looked at the specs?
And chapter on inheritance really makes me cry...
http://javascript.crockford.com/code.html
http://perfectionkills.com/understanding-delete/