Hello! Andy Wingo <[EMAIL PROTECTED]> writes:
> On Tue 09 Sep 2008 10:41, [EMAIL PROTECTED] (Ludovic Courtès) writes: > >> So, previously, there was `variable-ref': > > There still is. It is used when a variable is bound immediately, when it > is pushed on the stack by a link-now instruction. OK, I see. >> Now, there's also a vector associated with each closure to store >> references to global variables, right? Looks better! > > That's always been the case IIRC, only before it used to push and pop a > bit more -- instead of > > (late-variable-ref 0) > > it would be > > (object-ref 0) > (variable-ref) Oh, right. >> It'd be nice if we could find a way to "do something" with the >> `current-reader' fluid at compilation time, like detecting top-level >> `(fluid-set! current-reader ...)' statements and use that to switch the >> compiler's reader (hacky...). > > Perhaps, there is already a repl-reader fluid for readline's benefit. > Note also that languages have readers as well, so that e.g. elisp can > read differently from scheme. Right, but `current-reader' is a dynamic thing, which complicates the situation. A use case is the following: (define-module (foo)) (fluid-set! current-reader %my-favorite-reader) ;; use non-standard syntax extensions from now on I use it this way in Skribilo, but I may well be the only user, who knows. ;-) Anyway, if we are to handle this at all, we're probably going to have to pattern-match this in `translate.scm' and switch readers when we encounter it. Thanks, Ludo'.