From: Coby Beck
Subject: Case sensitivity
Date: 
Message-ID: <952101167976@NewsSIEVE.cs.bonn.edu>
(quoted from posting by Erann Gat)
>Common Lisp is case-sensitive like people expect.  But the default
>readtable case is :upcase rather then :preserve, and the keywords
>(i.e. the names of the standard symbols) are all upper case.

Reading from another thread, this inspired a comment and a question:

Comment - C was my first programming language and i happily used a mix of
upper and lower case variable and function names.  Perhaps because of still
being quite "green", when i learned lisp it did not bother me at all to
change this style.  Something appeals to me about not bothering with the
shift key (except for the rare use of a parenthesis ; ) and i enjoy using
dashes and question marks and stars.

I think this is a very personal style consideration and a user's like or
dislike of this aspect of lisp will most likely stem from more general likes
and dislike about the language.

Question - Huh?

Or to be more specific, i thought lisp was a case IN-sensitive language!
I'm sure i was told this learning it and i know it behaves this way in my
development environment.  If not, why not make it so as this seems to be so
much of a de facto standard?

Coby

From: Barry Margolin
Subject: Re: Case sensitivity
Date: 
Message-ID: <3jTv4.60$NC6.1456@burlma1-snr2>
In article <············@NewsSIEVE.cs.bonn.edu>,
Coby Beck <·····@mercury.bc.ca> wrote:
>Or to be more specific, i thought lisp was a case IN-sensitive language!
>I'm sure i was told this learning it and i know it behaves this way in my
>development environment.  If not, why not make it so as this seems to be so
>much of a de facto standard?

The default behavior of the reader makes it seem as if it's case
inensitive; you have to go out of your way, by using escape sequences ('|'
or '\') or functions like MAKE-SYMBOL and INTERN, to notice the case
sensitivity.

Case sensitivity is in the language because symbols are sometimes used as
data objects rather than as variable names.  This was more true in earlier
versions of Lisp that didn't have character strings, but legacy code lives
on.  When you're using a symbol as a string-like object, case can matter.
Common Lisp was intended to be compatible with the Lisp dialects that led
up to it (PDP-10 Maclisp, Zetalisp, NIL) in this regard.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Michael Hudson
Subject: Re: Case sensitivity
Date: 
Message-ID: <m3zosfc2rd.fsf@atrus.jesus.cam.ac.uk>
"Coby Beck" <·····@mercury.bc.ca> writes:

> (quoted from posting by Erann Gat)
> >Common Lisp is case-sensitive like people expect.  But the default
> >readtable case is :upcase rather then :preserve, and the keywords
> >(i.e. the names of the standard symbols) are all upper case.
> 
> Reading from another thread, this inspired a comment and a question:
> 
> Comment - C was my first programming language and i happily used a mix of
> upper and lower case variable and function names.  Perhaps because of still
> being quite "green", when i learned lisp it did not bother me at all to
> change this style.  Something appeals to me about not bothering with the
> shift key (except for the rare use of a parenthesis ; ) and i enjoy using
> dashes and question marks and stars.

Oh yes.  Every single language in the entire world should be changed
to allow use of hyphens and questions marks (and other things, but
especially those) in identifiers.  Right now.  This actually
overstates my position, but not very much...

> I think this is a very personal style consideration and a user's like or
> dislike of this aspect of lisp will most likely stem from more general likes
> and dislike about the language.
> 
> Question - Huh?
> 
> Or to be more specific, i thought lisp was a case IN-sensitive language!
> I'm sure i was told this learning it and i know it behaves this way in my
> development environment.  If not, why not make it so as this seems to be so
> much of a de facto standard?

Lisp is case senstive, but the reader (by default) converts symbol
names to upper case before interning them.  So when you write 

'foo

you are actually dealing with the symbol named "FOO".  Hence

(eq 'foo 'FOO) => t


because 

(string-equal (string-upcase "foo") (string-upcase "FOO"))

(plus details to do with packages)

I'm partly writing this out to help my own understanding...

Cheers,
Michael

-- 
very few people approach me in real life and insist on proving they are
drooling idiots.                         -- Erik Naggum, comp.lang.lisp
From: Robert Monfera
Subject: Re: Case sensitivity
Date: 
Message-ID: <38C0C5CE.336EC79F@fisec.com>
Coby Beck wrote:

> Something appeals to me about not bothering with the
> shift key (except for the rare use of a parenthesis ; )

It's common to map the [ and ] keys to ( and ).

> and i enjoy using dashes

Isn't it lovely compared to those weird _s?

> If not, why not make it so as this seems to be so much of a de facto
> standard?

Barry gave you the historical reasons for case-sensitivity.  With a
forward-looking justification, case sensitivity helps

- implement domain-specific languages that must be case sensitive
- using symbol names when communicating with other systems
- implement Java in Lisp :-)

Robert
From: Marc Battyani
Subject: Re: Case sensitivity
Date: 
Message-ID: <F34DE1175E54332F.FD2C107362855683.79D67E6E312CE2B6@lp.airnews.net>
Robert Monfera <·······@fisec.com> wrote in message
······················@fisec.com...
>
> Coby Beck wrote:
>
> > Something appeals to me about not bothering with the
> > shift key (except for the rare use of a parenthesis ; )
>
> It's common to map the [ and ] keys to ( and ).

Just switch to a French keyboard layout ;-)

> - implement Java in Lisp :-)

Good idea. It will run faster than the original, have a decent GC and less
bugs.

Marc Battyani