[racket-dev] very unhelpful beginner language error message, possible fix proposed
On Feb 13, 2012, at 8:28 AM, David Van Horn wrote:
> In BSL, you can detect when the first element of a clause is a variable bound to a function, but I don't follow the reasoning about ISL. You can't distinguish good from bad uses without running the code because you can't tell if a name refers to a function or a non-function.
Not reliably, because the student COULD be using a parameter or a local variable in that position. But in the COMMON case of this error, the student will use a predefined function or an explicitly user-defined top-level function, and it should be possible to recognize those at syntax-check-time.
Which leaves
> cond: question result is not true or false: (lambda (a1) ...)
as a good error message to report at run time in the rare cases that don't match the above description.
Stephen Bloch
sbloch at adelphi.edu