[Edu-sig] On case sensitivity

David Scherer dscherer@cmu.edu
Fri, 4 Feb 2000 13:09:01 -0500

-----Original Message-----
From: David Scherer [mailto:dscherer@cmu.edu]
Sent: Friday, February 04, 2000 1:09 PM
To: Jim Harrison
Subject: RE: [Edu-sig] On case sensitivity

> Though I have no objective evidence to show, I would guess that one of the
> main problems with case stems from Python's ability to create variables
> on-the-fly (without declarations). If variables are required to
> be declared
> up front, most case errors involving variable names would be caught
> immediately as syntax errors and fixed. In Python, a case error in an
> assignment statement would create a new variable with a new name.
> This would
> yield a logical error with unpredictable results that might be very
> difficult for a beginner to track down. I can imagine a novice staring at
> the code for a long time without seeing the problem in a situation like
> this. One such episode, and I'd tell my teacher that the main problem with
> Python is case sensitivity.

Variable declarations also add a lot of cognitive overhead - one more
meaningless piece of syntax that would be a prerequisite to _doing

As I pointed out earlier in the thread, the typo problem is not limited to
case errors.  I think it should be addressed by checking the user program
for identifiers that are used as lvalues and that appear exactly once in the

That addresses both case errors of the type you describe and other typos.

> It would be interesting to see whether the case errors that make an
> impression on beginners are the ones that yield immediately
> identifiable and
> fixable syntax errors, or the ones that yield logical errors.

In the case of the Alice trials, almost certainly the immediately
identifiable errors!  Alice code usually looks something like:


Since there are rarely any assignments at all at the level of the tutorial,
logical errors are unlikely.  However, beginners who do not understand the
difference between the different kinds of constructs in this program
(functions, methods, constants, objects) don't understand why all of the
identifiers have different required case.

> That being said, I vote for Guido's approach of handling this in
> the IDE as an optional feature.

Agreed, but it must be useful when enabled!  It's easy to accept any problem
with something by saying "oh, well you can always turn it off."

Dave Scherer