[racket] (Maybe) misleading error message

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Feb 19 22:40:45 EST 2012

On Sun, Feb 19, 2012 at 9:14 PM, Rodolfo Carvalho <rhcarvalho at gmail.com> wrote:
> On Mon, Feb 20, 2012 at 01:07, Robby Findler <robby at eecs.northwestern.edu>
> wrote:
>> In the interactions window, free variables are runtime errors not
>> compile time errors (unlike empty applications). If that had been in a
>> module (or in the definitions window), then you would have gotten
>> that, I believe.
> That's right. If I write that on the definitions window and run:
>            expand: unbound identifier in module in: generator
> Actually I don't even need to run, since the online syntax check is fast to
> provide feedback :)
> Just thought about someone copy-pasting from the docs like me and not
> understanding what was wrong...

Oh, absolutely.

As best I understand it, I'd say that our REPL situation is
non-optimal. We'd like to be able to have a REPL where expressions
work pretty much the same as they do in the body of a module, but the
basic problem is that the REPL only gets to see each expression at
once (at least with the way we currently imagine the REPL working) and
the module language has to see all of them to make its magic work.

So the REPL is in this kind of "in between" state where it sort of
does what you want most of the time, but when you think about it and
dig into the details, there are lots of problems to be found.

Sorry I don't have a better answer than that.....


Posted on the users mailing list.