As a polyglot developer it feels a little weird but it can't be helped. The mix of camel cased and snaked cases languages in the same project or in the same file is inevitable sometimes. Think a JS script tag and Ruby <% %> inline code in an html.erb file.
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=tru...
so in this study, where the subjects were trained in snake_case, they found snake_case was better.
and in the other study, where the subjects were trained in camelCase, they found camelCase was better.
I bet if we did another study of programmers who used kebab-case they'd find that kebab-case is better.
I don't think there's any reason to believe any particular case style is better than any other. personally I like snake_case and kebab-case because I find the word boundaries easier to recognize, but that's just a preference on my part. I have no idea if it's objectively better.
I prefer snake_case and believe it probably is mildly more readable than camelCase.
The underscore comes closer to space-delimited words like we use in English, typographically speaking. It's hard for me not to think that must be easier to read that way.
Obviously I can't prove it's better, but it both makes sense to me that it would be and fits with my subjective experience.
Code will be read more than it will be written, so it should be optimized for the reader.
But I'm eager to find counter examples.
> Results indicate 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.
What does it mean:
> those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style.
It is not normal if you train in reading something => you are good in recognizing that things that you are trained than something else than you did not train for?
If anyone has access to the study, how many among 135 are programmers that were trained in camel case and how many in snake case?
I vote for kebab-case, but I didn't find any study where it was included...
Seems like it should be shift+space inserts a variable-split-token and different editors can display it as a - _ or caps of the next character as desired. Like tab characters being configurable as a number of spaces.