Case sensitivity

Tim Churches tchur at optushome.com.au
Fri Feb 21 12:07:42 EST 2003


On Behalf Of David Mertz
> Well...  I am certainly NOT in favor of case-insensitivity FOR Python.
> That bird has left the coop.  But maybe for some hypothetical future
> language.  Or for that matter, documenters of the (many)
> case-insensitive languages I have used have had no great difficulty
> producing a succinct explanation (for beginners) of why names and
quoted
> literals are different.
> 
> My own shot at describing such a language, for example:
> 
>     String literals in FOO are used to describe a precise sequence of
>     (case-sensitive) characters.  If you wish to compare strings in a
>     case-insensitive style, the idiom "if upper(this)==upper(that):"
>     is useful (it "normalizes" case before a comparison is performed).
> 
>     Names, keywords, numbers, and other "semantic" aspects of the
>     language FOO can vary in their precise spelling.  For example,
"bar"
>     and "BAR" name the same variable; and "3.0", "3.00", "3e1" and
>     "0x03" all name the same number.  While consistency in
>     representation aids legibility of programs, allowing minor
>     variations makes remembering terms easier for most programmers.

That describes the behaviour of FOO but not why it behaves that way. Or,
as my seven-year old puts it: "In the FOO language, why are differences
in case permitted but not other differences in name representation? When
I wish to refer to BAR, why can't I type BAH?" 

However, further discussion of these points should indeed be relegated
to comp.lang.foo or COMP.LANG.FOO or comp.lang.fou, whichever.

Tim C








More information about the Python-list mailing list