
EyeTracking Study: camelCase vs. under_score style (2010) [pdf] - entelechy
http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf
======
lizmat
In Perl 6, you can also use "kebab-case":

    
    
        my $is-it-time = True;
    

The hyphen is allowed inside an identifier as long as it is not the first and
as long as it is followed by at least one letter.

    
    
        my $foo-42;  # interpreted as my $foo - 42

~~~
gumby
This is also the standard for Common Lisp, Scheme, emacs-lisp.

~~~
kazinator
Also Bash (for function names) (could be POSIX too), Make ...

------
pzone
My current style convention mixes several naming styles to help in
distinguishing code visually.

I prefer camelCase for variables, which need to be typed repeatedly, and camel
is fastest to type. I use snake_case for functions, UpperCamelCase for
classes/types, and ALL_CAPS_SNAKE for configuration variables a user would be
expected to edit.

~~~
charlesism

        camel is fastest to type
    

iAgree but englishIsAlso fasterToType byRemovingSpacesAnd
capitalizingFewerWordsThan usual. iDonT knowWhy weProgrammers
shouldConsiderThat aWorthwhile tradeOff

~~~
Jemm
iThink theGermansWouldAgree.

------
crazyfundu
For me it's more about ease in typing. I find typing underscore so many times
a bug deterrent in fast typing speed.

------
melling
snake case...

I did it for years in Perl then moved to camel with Java. Now, I sort of like
not having to type underscores.

~~~
charlesism
I went the other way. I like it when my code doesn't look like a jumble of
random letters with the least important words capitalized.

~~~
Mateon1
I went back and forth, both ways. I started out in Python with snake_case
identifiers, then moved to Javascript with camelCase, and now I mostly use
Rust with snake_case for names and UpperCamelCase for types.

I don't find either style better than the other, the only time I notice
anything is when I switch between style conventions (e.g. switch between JS
and Rust or C++), because I need to break the habit of typing one way rather
than the other.

Still, I find readability of the two styles pretty much identical at all times
once you get used to both.

~~~
sethammons
I mostly find the readability the same, except for acronyms in the middle.
RemoteHTTPIPAddr vs remote_http_ip_addr. I prefer the latter, but my go-to
language these days encourages the former.

~~~
sixhobbits
The "What is an acronym really and when should it be capitalised" debate is
grey enough that it's easier to consistently use

RemoteHttpIpAddr

~~~
lern_too_spel
Not capitalizing the entire acronym is the convention in modern Java and C#.

[https://google.github.io/styleguide/javaguide.html#s5.3-came...](https://google.github.io/styleguide/javaguide.html#s5.3-camel-
case)

[https://docs.microsoft.com/en-us/previous-
versions/ms182249%...](https://docs.microsoft.com/en-us/previous-
versions/ms182249%28v%3dvs.80%29)

