From: Mark H Weaver <mhw@netris.org>
To: rixed@happyleptic.org
Cc: guile-user@gnu.org
Subject: Re: Is this a bug?
Date: Tue, 30 Aug 2011 12:45:11 -0400 [thread overview]
Message-ID: <871uw2c0h4.fsf@yeeloong.netris.org> (raw)
In-Reply-To: <20110829112725.GA12774@ccellier.rd.securactive.lan> (rixed@happyleptic.org's message of "Mon, 29 Aug 2011 13:27:25 +0200")
rixed@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
next prev parent reply other threads:[~2011-08-30 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 12:36 Is this a bug? rixed
2011-08-22 22:47 ` Mark H Weaver
2011-08-29 11:27 ` rixed
2011-08-30 16:45 ` Mark H Weaver [this message]
2011-08-30 17:21 ` rixed
2011-08-30 17:24 ` Ian Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871uw2c0h4.fsf@yeeloong.netris.org \
--to=mhw@netris.org \
--cc=guile-user@gnu.org \
--cc=rixed@happyleptic.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).