home *** CD-ROM | disk | FTP | other *** search
- From: kers@hplb.hpl.hp.com (Chris Dollin)
- Date: Thu, 10 Sep 1992 08:39:00 GMT
- Subject: Re: Opinions on case sensitivity in programming languages?
- Message-ID: <KERS.92Sep10093900@cdollin.hpl.hp.com>
- Organization: Hewlett-Packard Laboratories, Bristol, UK.
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
- Newsgroups: comp.lang.misc
- References: <1992Sep10.034246.14218@oucsace.cs.ohiou.edu>
- Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
- Lines: 83
- In-Reply-To: tswingle@oucsace.cs.ohiou.edu's message of 10 Sep 92 03:42:46 GMT
- Nntp-Posting-Host: cdollin.hpl.hp.com
-
- In article ... tswingle@oucsace.cs.ohiou.edu (Tom Swingle) writes:
-
- 1. Do you prefer programming in a language which is case-sensitive or case-
- insensitive (or does it even make a difference to you), and why?
-
- It depends.
-
- If the language designer has got the names of the built-in keywords and
- identifiers right, case-sensitive is my preference.
-
- By ``right'', I mean lower or mixed case; not UPPER CASE; IT'S TOO HARD TO READ
- AND I'M DEAF ENOUGH ALREADY.
-
- 2. How significant an issue is case-sensitivity in your preference toward
- one language over another?
-
- It wouldn't make me pick a sematically or syntactically inferior language, just
- because it was case-sensitive; it might well induce me to write a suitable
- filter.
-
- 3. Since this article is posted to the C and Pascal newsgroups, here is a
- question for the respective users of each language: To the C programmers,
- do you feel that you would like C better if it were case-insensitive; and
- to the Pascal programmers, do you feel that you would like it better with
- case sensitivity?
-
- I've played both games, and with different flavours of Pascal cases. As a C
- programmer, I'd hate it if it were case-insensitive; of course, that might be
- becuase of all the code that would break. (I certainly willfully exploit
- case-sensitivity when writing C.)
-
- I'd certainly prefer Pascal to be case sensitive (isn't it? I can't recall), so
- long as keywords and built-in names weren't made upper case.
-
- 4. If you were designing a language, would you make it case-sensitive,
- case- insensitive, or maybe even allow for an option to go either way.
-
- All the languages I have designed (ur ... that's three, I think), and most of
- the ones I have been co-designer of, have been case-sensitive. I'd not have an
- option to switch.
-
- The only arguments I have heard against case-sensitivity have been:
-
- (a) You have to remember the case of the letters, not just the spelling of the
- name.
-
- Response: so long as conventional use of case in names prevails, this should
- not be a problem. Certainly if names such as ``cooRdinaTeS'' were used, it
- would be HoRrIblE. But the usual use of case distinction falls into a rather
- smaller set of patterns, and these patterns often correspond to differences in
- use -- for example, leading Capitals for Type names.
-
- In any case, similar objections apply to the common use of abbrevs in progs --
- one persons meat being another pers poison; is it pnt for pint or point? Env or
- envir for environment? rm, rem, or remove for delete? And have you had (as I
- have had) problems with British vs American spelling -- as in color, flavor,
- -ize where I'd have (and my reflexes provide) colour, flavour, -ise?
-
- (b) Names differing only in case can be confused.
-
- Yes, they can. But it doesn't happen very often. And names differing in a
- single character can often be confused, too, but we don't make a linguistic
- brouhaha about it. I'll happily use ``File'' for the type, and ``file'' for a
- variable of that type, and not expect myself, or other readers, to be confused.
-
- (c) But it fails the telephone test!
-
- How often do *you* read programs over the telephone? When the case is
- important, don't you add case markers -- ``capital String'', ``big FILE'', or
- voice change? The telephone test is a hint in the right direction, but it's not
- perfect; heavens, what about ``for'', ``four'', ``4'', ``fore''? Am I not
- permitted to call a variable ``#'' -- sorry, ``hash''? How do *you* pronounce
- ``+'', or ``==''? [OK, these aren't strictly fair; after all, we can use
- syntactic clues to work out what was meant. But code is primarily visual, not
- vocal; let's respect the strengths of the different media.]
-
-
-
-
- --
-
- Regards, | ``"I can't suit myself," said Weinbaum, a little petulantly.
- Kers. | "I work for the Government".'' - Blish, "The Quincunx of Time".
-