Live data from Hacker News

Apple JavaScript Coding Guidelines [pdf]

developer.apple.com

21–29 of 29 posts

Re: Apple JavaScript Coding Guidelines [pdf]

#21
post #6

For those who would prefer an HTML version: http://developer.apple.com/library/mac/#documentation/Script...

Or the actual PDF itself, which lacks the Scribd™ value-added feature of banner ads on every page: http://developer.apple.com/library/mac/documentation/Scripti...

I think the OP's link is actually to the PDF. HN adds the automatic Scribd link whenever someone posts a link to a PDF.

Re: Apple JavaScript Coding Guidelines [pdf]

#23
post #16
post #5

Earlier quoted context omitted.

I find it strange that you refer to comments starting with # as Ruby-style comments.

I'm pretty sure Ruby is bigger than Perl and sh put together now, at least in mindshare.

python and PHP also support # for making comments. It could be argued that python has just as much if not more mindshare than ruby. :)

Re: Apple JavaScript Coding Guidelines [pdf]

#25
post #6

Earlier quoted context omitted.

Or the actual PDF itself, which lacks the Scribd™ value-added feature of banner ads on every page: http://developer.apple.com/library/mac/documentation/Scripti...

I think the OP's link is actually to the PDF. HN adds the automatic Scribd link whenever someone posts a link to a PDF.

Wow, that's horrible.

Re: Apple JavaScript Coding Guidelines [pdf]

#26

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")

Re: Apple JavaScript Coding Guidelines [pdf]

#27
post #10

Man, what a piece of shit. Apple should pull this immediately.

Good that I saw this before reading the pdf. Can you point me to a better resource?

JavaScript Garden is the best collection of JavaScript best practices I have seen so far: http://bonsaiden.github.com/JavaScript-Garden/

Re: Apple JavaScript Coding Guidelines [pdf]

#28
post #25

Earlier quoted context omitted.

I think the OP's link is actually to the PDF. HN adds the automatic Scribd link whenever someone posts a link to a PDF.

Wow, that's horrible.

The original announcement (2008):

http://www.scribd.com/doc/50406482/Hacker-News-Integrates-Wi...

Re: Apple JavaScript Coding Guidelines [pdf]

#29
post #16

Earlier quoted context omitted.

I'm pretty sure Ruby is bigger than Perl and sh put together now, at least in mindshare.

python and PHP also support # for making comments. It could be argued that python has just as much if not more mindshare than ruby. :)

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.
Post reply on HN