The naming convention for a term like doSomething is camel case.

What would the naming convention of do-something be called?

closed as primarily opinion-based by user40980, jwenting, david.pfx, Bart van Ingen Schenau, Dynamic Jun 16 '14 at 18:47

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 14
    like-this-casing is very common in LISP/Scheme variants. – hammar Aug 29 '11 at 17:30
  • 6
    It's the only naming convention that doesn't require a chorded keystroke, which makes my hands happy. You can't get away with it in most languages (LISPs being the notable exception), but I always use it as my file naming convention. – Mud Aug 29 '11 at 21:44
  • 9
    I heard it's called kebab-case; also see this question. Rats, my "trivial" answer was converted to a comment :( – aditsu May 14 '13 at 7:14
  • 2
    It's not "casing" at all. It's simply hyphenated. – kevin cline Aug 6 '13 at 16:16
  • 1
    This question appears to be off-topic because it is about what name to give a thing. [And it's a duplicate on SO.] – david.pfx Jun 16 '14 at 14:44

Delimiter-Separated which could also use the underscore (Delimiter_Separated).

...A common recommendation is "Use meaningful identifiers." A single word may not be as meaningful, or specific, as multiple words. Consequently, some naming conventions specify rules for the treatment of "compound" identifiers containing more than one word.

As most programming languages do not allow whitespace in identifiers, a method of delimiting each word is needed (to make it easier for subsequent readers to interpret which characters belong to which word).

Delimiter-separated words

One approach is to delimit separate words with a nonalphanumeric character. The two characters commonly used for this purpose are the hyphen ("-") and the underscore ("_"); e.g., the two-word name "two words" would be represented as "two-words" or "two_words". The hyphen is used by nearly all programmers writing COBOL, Forth, and Lisp; it is also common for selector names in Cascading Style Sheets. Most other languages (e.g., languages in the C and Pascal families) reserve the hyphen for use as the subtraction infix operator, so it is not available for use in identifiers and underscores are therefore used instead...

  • 20
    Yeah, but this is too generic. Has anyone ever referred to camel case as "letter-case separated"? Plus, if anyone starts to learn Lisp because of my answer, we all win. – Keith Layne Aug 29 '11 at 17:49
  • 3
    Sometimes called kebab-case, but hyphen-separated is also fine. What is important that libraries (like underscore.string actually know all these apart (camelCase, PascalCase, snake_case, kebab-case), albeit sometimes with different names, and allow you to use them as a fact of being. – herby Apr 6 '15 at 18:32
  • 1
    Colloquially, I've heard folks call it "spinal-case" -- especially in the web-dev. world. [Underscores are apparently called "snake_case" -- en.wikipedia.org/wiki/Snake_case.] – BrainSlugs83 Oct 14 '15 at 19:26

I call it lisp-case for lack of a better term, and for a lack of seeing it used much (if ever) in other language families.

  • 1
    Here is a reference for you. – Scott Whitlock Aug 29 '11 at 17:31
  • 11
    For all the haters out there...Lisp is older than the alphabet. Lower case had not been invented yet. As such case did not matter and therefore all your fancy naming conventions were useless, as everything got squashed to all caps. The dashes (which a Lisp interpreter would never confuse with application of minus) were the best way to make functions, etc. readable. – Keith Layne Aug 29 '11 at 18:05
  • 1
    They are not haters, just that a few of us (lucky ones?) have been around longer than .NET and Java 1.6. History is not a fav topic in Comp Sci courses. – mattnz Aug 29 '11 at 20:58
  • 1
    @matt True, but Scheme and Lisp should still be, at least in some places. My first ever CS course was taught in Scheme and it blew my mind and changed my major. I wonder about the state of today's CS education...used to be everyone used SICP. – Keith Layne Aug 29 '11 at 21:24
  • 2
    While not technically an actual language - it's one of the common conventions that CSS designers use for naming element ids and classes. Also, HTTP header names use hyphen separators. So, true that Lisp likely did it first - but it's not a convention unique to Lisp. – HorusKol Aug 30 '11 at 2:58

There isn't really a specific standard name for this case convention, and there is disagreement over what it should be called.

Lisp has used this convention for decades as described in this Wikipedia entry. For that reason, Keith Layne's answer of lisp-case is reasonable, though it's an original coining.

And according to this Wikipedia entry, it may also be called spinal-case or kebab-case (and the upper case version called Train-Case). All of these forms have also been contested as original coinings.

So there isn't a single widely-accepted name for this case convention analogous to snake_case or camelCase, which are widely-accepted.

  • 2
    +1 For a reference (even if it is Wikipedia. Shows that at least one other person uses these terms) – KChaloux Aug 6 '13 at 16:47
  • +1 for kebab-case, that's the one I've seen the most used – qwertzguy Mar 5 at 18:18
  • kebab-case is by far the most used one according to Google Trends: trends.google.com/trends/… – qwertzguy Mar 5 at 18:25
  • @qwertzguy perhaps write that up as a new answer. at the time i wrote this answer (august 2013) there really was no compelling case for a standard (see trends.google.com/trends/… -- basically no data), but now there is a case. – Ben Lee Mar 5 at 21:32
  • @Ben-Lee That's what I wanted to do but the question was marked as closed – qwertzguy Mar 6 at 2:14

I like "caravan case", because it looks like tokens chained together in a caravan. You can even picture a caravan of camels if you like.

  • 3
    Is this something you just now made up, or have you actually seen or heard someone use this term? – Jay Elston Sep 2 '11 at 5:12
  • 4
    I made it up just now. I don't think I've ever seen it used anywhere. – boshvark Sep 4 '11 at 18:39
  • 1
    ahh yes, a caravan of camels, that's an easy way to remember that it's camel-case.. I mean caravan-case – Gerard Simpson Mar 1 '18 at 23:11
  • This brought a lot of joy to my day – Zenuka Apr 26 at 7:19

Dasherization, usually used for URLs or other human readable cases.


The only time I see naming like that is for SEO purposes, so maybe SEO-case? In any event, it's not a good naming convention to use.

Not the answer you're looking for? Browse other questions tagged or ask your own question.