ri...@happyleptic.org 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