[plt-scheme] error message for case-sensitivy
From: ian barland (carrot trainer) (ian at cs.rice.edu)
Date: Tue May 25 10:46:07 EDT 2004 |
|
>> I cannot figure out how to access the SXML->HTML function:
>>
>> > SXML->HTML
>> 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.
--ian