Cleanup Issue DEFAULT-CASE
- Status
- squashed by Cleanup Committee chairman
- Forum
- Cleanup
- Category
- CHANGE
- References
- CLtL p 334 ff: What the Read Function Accepts; especially p 337. Issue: READ-CASE-SENSITIVITY
Problem Description
In most programming/operating-system environments where the case of names of functions, programs, identifiers, and files *does* matter, the case of most characters used for such purposes is lower case. One example of such an environment is the Unix operating system.
The resolution of the READ-CASE-SENSITIVITY will permit one to write case-sensitive Lisp code however since the the case of characters in the print names of all standard functions and symbols is upper, this will make using the Lisp in a case-sensitive mode difficult.
Proposal (LOWER)
The case of all characters in the names of standard functions, symbols, and packages is lower.Rationale
People running in a case-insensitive mode shouldn't care which case is the default case.
People running in a case-sensitive mode care very much which case is default, and for most of these people lower case is preferred.
Furthermore there are a large number of users of Lisp in case-sensitive environments and it is important that the desires of these users be met.
Current Practice
Franz Inc's Allegro Common Lisp supports a case-sensitive reader with either a upper-case default for names or a lower-case default. A number of people use the case-sensitive feature with a lower-case default. I don't know anyone that uses the lisp in a case-sensitive mode with an upper-case default.Cost to Implementors
In case-insensitive mode, the cost to make characters downcase rather than upcase should be small.
The cost of locating and fixing all of the places where
the default case of symbol names actually matters will be moderate
(I suspect that the older the Lisp the more numerous
the instances of dependency on the case of the names).
Cost to Users
Again, the cost of locating and fixing all of the places where the default case of symbol names actually matters will be moderate.
As an example, to find and fix all of the places in the PCL source (~15000 lines) that depend on the default case took me 15 minutes.
Cost of Non-Adoption
Using Lisp in case-sensitive environments will continue to be awkward.
It will continue to be hard for Lisp to interact with programs written in case-sensitive languages (such as C).
The use of case sensitivity as a tool for writing programs will continue to be unavailable to Lisp programmers.
Vendors will invent their own methods of adding case-sensitivity, each in their own different way.
Benefits
See 'Cost of Non-Adoption'.Aesthetics
Most Lisp books (including CLtL) put Lisp code in lower case. I believe that most people prefer to read text written in lower case.Discussion
The best solution would be for there to be a way to make the reader case-sensitive (i.e. a resolution to the READ-CASE-SENSITIVITY issue) and for DEFAULT-CASE:LOWER to pass. If for some reason the READ-CASE-SENSITIVITY should not be resolved in a manner that results in a case-sensitive reader option, it would still be good to pass DEFAULT-CASE:LOWER since that would bring Common Lisp one giant step closer to supporting the case-sensitive environment.
-------------------------------
Edit History
- 16-Mar-89, Version 1 by jkf