Subject: Re: bug#16363: interactive use subject to compiler limitations

From: Mark H Weaver <[email-masked]>
Date: Wed, 15 Jan 2014 15:03:29 -0500

tags 16363 notabug
thanks

Zefram <[email-masked]> writes:

> guile-2.0.9's compiler has some inconvenient restrictions, relative to
> its interpreter.  Where the compiler is automatically applied to scripts,
> the restrictions aren't a serious problem, because if compilation fails
> then guile falls back to interpreting the script.  But in an interactive
> REPL session, by default each form entered by the user is passed through
> the compiler, and if compilation fails then the error is signalled,
> with no fallback to interpretation.
>
> As a test case, consider a form in which a procedure object appears.
> The compiler can't handle forms that directly reference a wide variety of
> object types, including procedures (both primitive and user-defined) and
> GOOPS objects.  In the interpreter these objects simply self-evaluate,
> and it can be useful to reference them without the usual indirection
> through a named variable.

Scheme does not allow arbitrary user objects to be embedded directly
into the source code.  It worked by accident in Guile 1.8, but in a
system with ahead-of-time compilation to object files, which requires
that all code and literals be serialized, there's no sane way to support
the semantics you seem to want.

     Regards,
       Mark