Page 1 of 1

What name do you use for the dashed lisp naming convention?

Posted: Tue Aug 30, 2011 5:38 pm
by keith.layne
Hey everyone,

This question came up recently on another well-known(?, or is it p) forum. The context was a little different, but I put in my two cents and tried to evangelize for Lisp a little.

I was wondering if there is a more correct answer from antiquity that I don't know about that one of you might be able to share.

Thanks!
Keith

Re: What name do you use for the dashed lisp naming convention?

Posted: Tue Aug 30, 2011 10:53 pm
by Duke
I note that the word "hyphenated" didn't occur in that discussion. ;)

I can't really think of any clever neologisms... maybe "choo-choo-case" because the hyphens make it look like a train. :lol:

Re: What name do you use for the dashed lisp naming convention?

Posted: Tue Aug 30, 2011 10:54 pm
by adam33147
Off the top of my head, I would call it dash separated, and I wouldnt use the word case, because the case is either lower or upper. Camel case is named so because of its uppercase "humps".

Re: What name do you use for the dashed lisp naming convention?

Posted: Tue Aug 30, 2011 11:32 pm
by keith.layne
Cammels have humps?

Re: What name do you use for the dashed lisp naming convention?

Posted: Wed Aug 31, 2011 5:38 am
by edgar-rft
keith.layne wrote:Cammels have humps?
No, cammels have hummps, only camels have humps.

- edgar

Re: What name do you use for the dashed lisp naming convention?

Posted: Wed Aug 31, 2011 8:03 am
by keith.layne
Thanks, I'll be here all week. Make sure to tip your bartender.

Re: What name do you use for the dashed lisp naming convention?

Posted: Wed Aug 31, 2011 12:05 pm
by edgar-rft
Attempt of a bit more serious answer. Based on my experience of reading Lisp manuals since approx. fiveteen years the most often used words for Lisp's dashes are "hyphen", "hyphenation", and "hyphenated".

After digging some old Lisp manuals at:
it appears to me as if until the late 1970s long symbol names in Lisp were just simply written as LONGSYMBOLNAMES. The two main predecessor Lisps before the Common Lisp unification were Interlisp and MacLisp. While Interlisp barely uses hypens in symbol names, in MacLisp many long symbol names were written with hyphens. This means that if there is any explanation for the use of hyphens in long Lisp symbol names then it must be found either in some old MacLisp docs or in the pre-CLtL1 discussions between the MacLisp and Interlisp developers.

The most obvious reasons why Lisp uses hyphens and not underscores or CamelCase are:
  • A hyphen needs one key, while an underscore can only be typed using the SHIFT key (= minimum two keys).
  • Lisp uses prefix syntax, where "X minus 1" ist typed as (- X 1) and not as x-1. Using infix syntax is the reason why languages like C are forced to forbid hyphens inside variable and function names and use the more awkward underscore instead.
  • Using CamelCase makes not much sense in Lisp, because in many Lisp languages symbol names are internally converted to uppercase. Common Lisp can be told to work with case-sensitive symbol names, but this does not work in all Lisp languages.
- edgar

Re: What name do you use for the dashed lisp naming convention?

Posted: Wed Aug 31, 2011 12:59 pm
by keith.layne
Right on. That's some solid research. I was actually (I'm embarrassed to say this) hesitant to use the word 'hyphen' for fear of being bashed by someone saying '- isn't a hyphen, it's spelled --'.

For some reason I have trouble being serious. I think it might be a condition.

Re: What name do you use for the dashed lisp naming convention?

Posted: Thu Sep 01, 2011 9:23 am
by tkbits
I guess nobody calls it COBOL style.
The reasons for choosing hyphenated names in COBOL differ from what has been mentioned.

Re: What name do you use for the dashed lisp naming convention?

Posted: Wed Sep 07, 2011 4:50 am
by Paul
keith.layne wrote:Right on. That's some solid research. I was actually (I'm embarrassed to say this) hesitant to use the word 'hyphen' for fear of being bashed by someone saying '- isn't a hyphen, it's spelled --'.
What's that in English? ('-' is a hyphen. '--' is two hyphens!)