Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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

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

share|improve this question
13  
"Do not do this-casing." Although I wonder what language such a convention would even be supported? I'd think most languages would read that as do minus something. – user414076 Aug 29 '11 at 17:24
13  
fail-casing ... – IAbstract Aug 29 '11 at 17:25
3  
You win this round, Joel Etherton. – user414076 Aug 29 '11 at 17:27
15  
Minus infinity to you all!!! Never used Lisp, I'm guessing? – Keith Layne Aug 29 '11 at 17:28
8  
like-this-casing is very common in LISP/Scheme variants. – hammar Aug 29 '11 at 17:30
show 13 more comments

6 Answers

up vote 13 down vote accepted

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

share|improve this answer
7  
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

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.

share|improve this answer
1  
Here is a reference for you. – Scott Whitlock Aug 29 '11 at 17:31
6  
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
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
1  
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
show 1 more comment

Maybe Lowercase Dash Separated Words (or LDSW)

share|improve this answer
+1 for the nice descriptive name, but.... -1 for it being called 'new' in the link. Mr. McCarthy would probably shoot that guy with his lambda gun. – Keith Layne Aug 29 '11 at 17:54
6  
How about Lowercase Separated Dash (LSD) because you have to be tripping to use this convention rimshot :) – Wayne M Aug 29 '11 at 17:55
1  
I think I'd settle on Lowercase Dash Separated. No need for "Words" IMO. A specific form of @Jeff's Delimiter Separated. And describes the convention without ambiguity in my opinion. – w3d Aug 30 '11 at 1:32
Yeah @w3d, that's fine. Seems that it's better. :) – Saeed Neamati Aug 30 '11 at 1:50

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.

share|improve this answer
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
I made it up just now. I don't think I've ever seen it used anywhere. – boshvark Sep 4 '11 at 18:39

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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