Case-sensitivity: why -- or why not? (was Re: Damnation!)

Will Ware wware at world.std.com
Sun May 21 09:39:57 EDT 2000


Quoting Alice project literature, Fredrik Lundh (effbot at telia.com) wrote:
>     "... It may be that Microsoft's Visual Basic programming
>     environment provides the best of both worlds by following the user
>     to type in a case-insensitive way, while the programming environment
>     applies the proper case to the program text on behalf of the user
>     whenever possible."

Maybe case-insensitivity should be a feature for something like IDLE rather
than the core language. As a newbie types stuff in, the first occurrence of
each symbol is recorded as the preferred-case version, and subsequent
differing-case versions could be translated to that before being shipped to
the interpreter. The interpreter could then remain case-sensitive for the
benefit of non-newbies.

Efficiency considerations might make it preferable to implement case-
insensitivity somewhere in the Python executable. In that case, maybe it
could be switched on with a command line switch, and be switched off by
default. Future versions of IDLE would use the command line switch, but
experienced programmers could simply ignore it.

This would mean that newbies could use code written by experienced people
(the Python library, stuff on Parnassus) but case-wobbly newbie code would
need to be processed by CaseNanny.py before it could be used by case-aware
folks.
-- 
 - - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware	email:    wware @ world.std.com



More information about the Python-list mailing list