[plt-scheme] error message for case-sensitivity
On Tue 25 May 2004 16:54, John Clements wrote:
>
> 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
> do-able.
Going even further, you could check not only for re-casings but also for
misspellings. SWI-Prolog does this:
?- writes(foo).
ERROR: Undefined procedure: writes/1
ERROR: However, there are definitions for:
ERROR: write/1
ERROR: writef/1
ERROR: writeq/1
ERROR: write/2
ERROR: writef/2
ERROR: writeq/2
--
Grzegorz Chrupała | http://pithekos.net | grzegorzc at jabber.org
[S]ome women have a fourth photopigment, giving them an edge when it
comes to recognizing subtle variations such as mauve and chartreuse.
-- Gary Marcus