Live data from Hacker News

Apple JavaScript Coding Guidelines [pdf]

developer.apple.com

11–20 of 29 posts

Re: Apple JavaScript Coding Guidelines [pdf]

#11
post #5

I find it strange that the "Global Scope Considerations" section uses Ruby-style inline comments (#) rather than actual JS inline comments (//).

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

Or any other language that denotes comments with an octothorpe, but I opted for brevity.

Re: Apple JavaScript Coding Guidelines [pdf]

#13
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?

As seen elsewhere in the comments, Crockford's is very good:

http://javascript.crockford.com/code.html

Re: Apple JavaScript Coding Guidelines [pdf]

#16
post #5

I find it strange that the "Global Scope Considerations" section uses Ruby-style inline comments (#) rather than actual JS inline comments (//).

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.

Re: Apple JavaScript Coding Guidelines [pdf]

#20

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

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