Wes,

I was referring to the _very_ first reply to this thread.

Thanks again

Rick



-- Sent from my Palm Pre
On Sep 9, 2011 4:48 PM, Wes Garland <[email protected]> wrote: 

On 9 September 2011 16:06, Rick Waldron <[email protected]> wrote:

I was actually very specifically looking for an answer regarding First letter 
casing for non-constructor built-in objects, ie. Math and Proxy. I think the 
legacy Java style guide influence addresses the question as best as I can hope 
for.


These  *did* come to us via Java (well, not Proxy), but they are hardly a 
matter of style; they are a matter of specification.

Generally we name constructor functions with CapitalLeadingCamelCase and 
everything else with smallLeadingCamelCase.  I think I picked this up from 
JavaScript: The Definitive Guide, 2nd Edition, by David Flanagan, about 4,000 
years ago.


As for other matters of style, I am a big proponent of brace-on-a-line in 
C-syntax languages, however this has proven to be a problem in practice with 
JavaScript due to the interaction between automatic semicolin insertion and 
object literal syntax in return statements:


return{ 
  Hello: "world" };

is not the same as

return {  Hello: "world"
}

Wes

-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to