loading...

re: snake_case, camelCase, or dash-case? VIEW POST

FULL DISCUSSION
 

Eye-tracking study finds that snake_case is more readable than camelCase.

I like how Ruby uses snake case for typical variables and methods and UpperCamelCase for objects and UPPER_SNAKE_CASE for constants. The convention of using the different cases to signify different things makes for a lot of good legible code IMO.

 

I agree with all of this, but also feel kebob case is just easy to read as snake case. I tend to prefer it for file names.

 
Sloan, the sloth mascot Comment marked as low quality/non-constructive by the community View code of conduct

also feel

It's a good thing feelings don't trump observations found in scientific studies. Also, not everyone is the same, it turns out.

 
 

I'm just waiting for a language to come around that codifies these conventions as errors so the style arguments die.

code of conduct - report abuse