DEV Community

loading...

Discussion on: snake_case, camelCase, or dash-case?

Collapse
ben profile image
Ben Halpern

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.

Collapse
codemouse92 profile image
Jason C. McDonald

TIL!

Collapse
nickelkr profile image
Kyle Nickel

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.

Collapse
mburszley profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Maximilian Burszley

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.

Collapse
mburszley profile image
Maximilian Burszley

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