Case Sensitivity and Learnability

Tim Peters tim_one at email.msn.com
Sat Jan 29 16:26:52 EST 2000


[possibly Will Rose]
> ... If unskilled programmers find case too difficult or distracting,
> the cure is to force a single case, either upper or lower.  This could
> be done by an (optional?) compiler switch.

[Carel Fellinger]
> this would make it impossible to import library modules that do depend
> on case distinction. Or would it be a per module switch, settable in
> the source?  Now that will improve things:)

Relying on case-sensitive file names is already broken in *portable* Python,
as some filesystems don't support the notion (e.g., while NT's NTFS
*preserves* filename case, system functions ignore it).  And Python had to
grow the PYTHONCASEOK envar switch for filesystems that don't even preserve
case.

> I, for one, vehemently dislike case insensitive languages, as
> they force me to use ugly naming conventions like:
>
>   class tv_class: pass
>   tv = tv_class()
>
> yack, instead of the much clearer:
>
>   class TV: pass
>   tv = TV()
>
> Admitted you have to know this convention of using case to
> distinct classes from variables:), but then in natural language
> we use this same trick to distinguish persons from objects like
> in Bill and bill.

As in Bill of Materials, or

> groetjes, carel

<wink>?  The problem seems more that in programming we use a great many
compound "made up" words, and it can be a real bitch to remember e.g.
whether some function is named moveUp or MoveUp or moveup.  Some moron API
designer may even supply all three, but doing slightly different things.
You can say a consistent set of rules "should be" followed, but that's a lot
like saying newbies "shouldn't get" confused to begin with <wink>.

> So how hard can it be for a newbie:) OTOH, I'm easily convinced
> by proper usability studies.

The great thing about newbies is that they pay no attention whatsoever to
arguments about how they should behave <0.9 wink>.  I recently posted a link
to Matt Conway's doctoral dissertation (see DejaNews), where his project's
difficulties in using Python in a newbie-oriented system are explained.  The
Alice system ships with a modified interpreter that ignores case (and also
treats int/int as a floating-point operation).

ever-use-a-case-sensitive-web-search?-ly y'rs  - tim






More information about the Python-list mailing list