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

Whatever is on your mind, whether Lisp related or not.

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

Postby keith.layne » Tue Aug 30, 2011 5:38 pm

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
keith.layne
 
Posts: 4
Joined: Tue Aug 30, 2011 5:27 pm

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

Postby Duke » Tue Aug 30, 2011 10:53 pm

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:
"If you want to improve, be content to be thought foolish and stupid." -Epictetus
Duke
 
Posts: 38
Joined: Sat Oct 17, 2009 10:40 pm

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

Postby adam33147 » Tue Aug 30, 2011 10:54 pm

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".
Last edited by adam33147 on Wed Aug 31, 2011 5:04 am, edited 1 time in total.
adam33147
 
Posts: 20
Joined: Sat Aug 20, 2011 6:49 pm

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

Postby keith.layne » Tue Aug 30, 2011 11:32 pm

Cammels have humps?
keith.layne
 
Posts: 4
Joined: Tue Aug 30, 2011 5:27 pm

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

Postby edgar-rft » Wed Aug 31, 2011 5:38 am

keith.layne wrote:Cammels have humps?

No, cammels have hummps, only camels have humps.

- edgar
edgar-rft
 
Posts: 157
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

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

Postby keith.layne » Wed Aug 31, 2011 8:03 am

Thanks, I'll be here all week. Make sure to tip your bartender.
keith.layne
 
Posts: 4
Joined: Tue Aug 30, 2011 5:27 pm

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

Postby edgar-rft » Wed Aug 31, 2011 12:05 pm

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
edgar-rft
 
Posts: 157
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

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

Postby keith.layne » Wed Aug 31, 2011 12:59 pm

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.
keith.layne
 
Posts: 4
Joined: Tue Aug 30, 2011 5:27 pm

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

Postby tkbits » Thu Sep 01, 2011 9:23 am

I guess nobody calls it COBOL style.
The reasons for choosing hyphenated names in COBOL differ from what has been mentioned.
tkbits
 
Posts: 3
Joined: Sat Aug 02, 2008 8:15 pm
Location: USA

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

Postby Paul » Wed Sep 07, 2011 4:50 am

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!)
Paul
 
Posts: 106
Joined: Tue Jun 02, 2009 6:00 am


Return to The Lounge

Who is online

Users browsing this forum: No registered users and 3 guests