[plt-scheme] error message for case-sensitivity

From: John Clements (clements at brinckerhoff.org)
Date: Tue May 25 10:54:26 EDT 2004

On May 25, 2004, at 10:46 AM, ian barland (carrot trainer) wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>> I cannot figure out how to access the SXML->HTML function:
>>> reference to undefined identifier: sxml->html
> Well this real-world error belies my theory that seeing a
> "unbound identifier" error would tip off the user as to the problem,
> and I can see that the cause of the problem is invisible unless you're
> already thinking along the lines of case-sensitivity.
> Just off the top of my head, what if the user saw an error message 
> like:
>    reference to undefined identifier: gotChar
>    Perhaps you meant GOTCHAr?
>    PLT-Scheme is case-sensitive by default; see Help Desk for 
> alternatives.
> Presumably implemented by keeping an extra hash table of all 
> identifiers
> downcased, but that table only needs to be checked once an error has 
> already
> happened (and the extra message added only when there's a match in this
> secondary table).
> I don't know if the extra memory required is worth this one specific
> error message, but I'll wager that in the teaching languages it will 
> save
> hours of frustration.

You could go even further with this.  I can imagine a system that would
1) check for similar re-casings of the identifier, and suggested them 
to the user.
2) if this doesn't work, ask the user whether this was supposed to 
refer to a user-defined or library procedure.
3) If a user-defined procedure, allow the user to browse a list of the 
user-defined procedures.

I'm not sure what kind of research there is in here, but it seems 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2169 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20040525/93d616f1/attachment.p7s>

Posted on the users mailing list.