News for hackers. Stuff that matters.
Re:Zurb Foundation 5 Released by Segmentation on Thursday November 21, 2013 @04:46PM (#6777750)
> The clear convention in JavaScript is camelCase, why switch away from it?

Citation?

Re:Zurb Foundation 5 Released by chrisfarms on Thursday November 21, 2013 @05:05PM (#6777870)
Let's just try some searches for some common names using github code search with a ".js" extension filter

hideImage vs hide_image: 424 vs 50

toggleItem vs toggle_item: 1022 vs 52

clickElement vs click_element: 3469 vs 368

Coding conventions by statistics :)

https://github.com/search?q=searchPage+extension%3Ajs&type=C...

Re:Zurb Foundation 5 Released by jessedhillon on Thursday November 21, 2013 @04:56PM (#6777813)
How would you even expect this to be cited?

Seriously, does someone need to crawl every Javascript project on Github and compile statistics on naming styles before they can make an obviously true statement like this? The fact that camelCase is the norm in the language and browser environment is obvious to anyone who has written even a modest amount of JS.

   notQuantified != false
Re:Zurb Foundation 5 Released by cstigler on Thursday November 21, 2013 @06:36PM (#6778343)
notQuantified !== false

to avoid type coercion here

Re:Zurb Foundation 5 Released by mendelk on Thursday November 21, 2013 @09:01PM (#6778806)
S/he was using CoffeeScript, obviously! :)
Re:Zurb Foundation 5 Released by madeofpalk on Friday November 22, 2013 @04:41AM (#6779940)
> crawl every Javascript project on Github and compile statistics on naming styles

You mean... like this? http://sideeffect.kr/popularconvention/#javascript

Unfortuantely there's no stat there for camelCase for Javascript.

Re:Zurb Foundation 5 Released by ceejayoz on Thursday November 21, 2013 @05:39PM (#6778038)
> Citation?

Well, it's sure as hell not window.set_timeout, window.clear_interval, window.on_load, etc.

Re:Zurb Foundation 5 Released by lowboy on Thursday November 21, 2013 @04:52PM (#6777789)
Javascript was created in camelCase, and most major open source projects I've used have been camelCase. I can't find any data on it, but it fits with my experience for what that's worth.
Re:Zurb Foundation 5 Released by wildermuthn on Thursday November 21, 2013 @05:46PM (#6778070)
Suggestion:

JavaScript.

Re:Zurb Foundation 5 Released by janus on Thursday November 21, 2013 @07:25PM (#6778512)
Camel cased would actually be javaScript
Re:Zurb Foundation 5 Released by Stratoscope on Thursday November 21, 2013 @11:49PM (#6779346)
Idiomatic JavaScript code uses both PascalCase and camelCase.

Constructors use PascalCase; variables and methods use camelCase.

So, it's OK to call it JavaScript! :-)