4 ms·
camelCase and PascalCase, right? Maybe it comes from the language name (python -> snake, JavaScript -> PascalCase) :-P Now being serious: Actually it is not a
by jeanlucas 10y ago
camelCase and PascalCase, right? Maybe it comes from the language name (python -> snake, JavaScript -> PascalCase) :-P
Now being serious: Actually it is not a standard, since it is not defined like PEP8 kinda defines[1]. Then it goes by what the community uses. From what I've seen, most projects use the camelCase/PascalCase, but some like Foundation switched to underscores[2]. There's no reason why one is better than the other in terms of readability.
On a more serious note: A study[3] suggests that "camel casing leads to higher accuracy among all subjects regardless of training, and those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style." There's a discussion in this blog post: [4].
IMO it's too immature to be attached to a style, like it is too immature to think you're better than other developers because you use vim.
--
[1]: https://www.python.org/dev/peps/pep-0008/#naming-conventions https://www.python.org/dev/peps/pep-0008/#naming-conventions
[2]: http://foundation.zurb.com/sites/docs/v/5.5.3/upgrading.html#javascript-variable-changes http://foundation.zurb.com/sites/docs/v/5.5.3/upgrading.html...
[3]: http://www.cs.loyola.edu/~binkley/papers/icpc09-clouds.pdf http://www.cs.loyola.edu/~binkley/papers/icpc09-clouds.pdf
[4]: https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/ https://whathecode.wordpress.com/2011/02/10/camelcase-vs-und...