Many people use the term Snake Case to describe variables or other symbols with_the_form_of_underscores
.
In the past week, I’ve launched several broad searches. I can’t find anything about the origin of this term that is more detailed than what Wikipedia says (above)
When did the earliest record of this term enter into use?
3
A person named Jack Dahlgren claims on Quora he invented the term in 2002 when he worked at Intel.
Here’s what he posted at above link:
I believe that I am the one who coined this term back in 2002 when I
was at Intel and we were evaluating Sharepoint Team Services. Based on
the unfortunate tendency of Sharepoint to escape spaces in names with
[underscore] characters (among other things) I recommended a policy of
using underscores to replace all spaces so that URLs would be slightly
shorter and much more readable.Given the existing “camelCase” name with humps in the middle, I called
it “snake_case” or if there were two flat spots, I jokingly called it
“road_kill_case”. Considering the size of Intel and my interactions
with Microsoft product team, it is possible that this is the origin,
but it is such a simple phase that I think it could have been invented
independently elsewhere too.
The earliest use I found in Usenet is in a post by Gavin Kistner to comp.lang.ruby on 23rd February 2004:
While writing my ValidForm library (http://phrogz.net/RubyLibs/) I
realized that I was mixing camelCase [which I love] with
whatever_you_call_this_case [which I don’t, but I see that Ruby uses a
lot of]. (BTW…what do you call that naming style? snake_case? That’s
what I’ll call it until someone corrects me.)
Ruby still uses this term today, for example in The Ruby Style Guide:
Use
snake_case
for symbols, methods and variables.Use
SCREAMING_SNAKE_CASE
for other constants.
2