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

Mike Fletcher mfletch at tpresence.com
Fri Jun 2 19:25:42 EDT 2000


For sufficiently large values of trivial ;) .

Consider the triviality factor in the examples below (and I'm not getting
into the complex sets of objects here, where prototypes and getattr/setattr
handlers and strange inheritance mechanics are set up which may do extremely
elaborate lookups/creations when a name lookup fails):

	module k uses module j's x attribute (there's also an X attribute)
--> need to rewrite k with knowledge of j's changed naming model (doable,
but ugly)

	module m dynamically receives a reference to an object o that in one
instance has an attribute p (it also, in that instance has an attribute P)
--> run-time system needs to know when m was written (thus whether it is
intending the first or second casing), as well as the renaming map within
object o (gack)

	module v gets a reference to an object and a string and tries to get
the attribute from object, oops, has been changed due to case mangling -->
where the heck did the string come from?  was it assembled from sub-parts?,
does the object have a name-mangling map? (double gack)

Changing case-sensitivity creates a new language.  Sure, you could port the
code, but it's not a trivial undertaking.  And getting the results to look
like considered names is... even more difficult  node --> node_ , or
something similar isn't helping make the name any easier to remember (stated
goal of case sensitivity).  How are you deciding which variant is the
"important" one that retains the natural name? Or are you just renaming
everything and forcing unnatural names for all?

Adding case-checking support to an editor begins to seem downright easy by
comparison :) .  Enjoy yourself,
Mike

-----Original Message-----
From: Johannes Nix [mailto:Johannes.Nix at mail.uni-oldenburg.de]
Sent: Friday, June 02, 2000 3:05 PM
To: python-list at python.org
Subject: Re: Case-sensitivity: why -- or why not? (was Re: Damnation!)


Russell Wallace <rwallace at esatclear.ie> writes:

> It seems to me that the important argument in this context is "case
> insensitivity will break millions of lines of existing code, and perhaps
> split the user base if a significant number of existing users refuse to

It is a trivial task to convert case-sensitive identifiers in unique
case-insensitive identifiers in case of a name clash.

Johannes

-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list