guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this a bug?


From: Mark H Weaver
Subject: Re: Is this a bug?
Date: Tue, 30 Aug 2011 12:45:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

address@hidden writes:
>> The problem is that the compiler, while compiling test.scm, sees no
>> syntax declaration of `without-exception', and therefore assumes that
>> `without-exception' is simply a top-level variable.
>
> So, according to you, should I fill a bug report or I am overusing the
> load directive ?

Andy would probably be a better person to answer this question, but I'll
take a stab at it.

I think you are overusing `load'.  In its most general form, `load'
interacts badly with ahead-of-time compilation, because it prevents the
compiler from being able to distinguish top-level procedure calls from
macro uses.  Without knowing the syntax of the program, a compiler is
practically useless.

`load' is optional in the R5RS, and it has been removed entirely from
the R6RS, which was designed with compilers in mind.  Guile allows the
use of `load', but its compiler assumes that undeclared identifiers are
top-level _variables_, not syntax.  This seems a reasonable compromise.

I can sympathize with the desire to use `load' for the sake of
portability, but if you try your `woe.scm' example with other
ahead-of-time Scheme compilers, I think you'll find that it's not
portable in practice.

     Best,
      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]