From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Is this a bug? Date: Tue, 30 Aug 2011 12:45:11 -0400 Message-ID: <871uw2c0h4.fsf@yeeloong.netris.org> References: <20110816123610.GA8991@ccellier.rd.securactive.lan> <87ipppcbcm.fsf@yeeloong.netris.org> <20110829112725.GA12774@ccellier.rd.securactive.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1314722757 3104 80.91.229.12 (30 Aug 2011 16:45:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2011 16:45:57 +0000 (UTC) Cc: guile-user@gnu.org To: rixed@happyleptic.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 30 18:45:53 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QyRRf-0005ZO-3C for guile-user@m.gmane.org; Tue, 30 Aug 2011 18:45:51 +0200 Original-Received: from localhost ([::1]:60209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyRRe-0001qc-5M for guile-user@m.gmane.org; Tue, 30 Aug 2011 12:45:50 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyRRa-0001qU-Kc for guile-user@gnu.org; Tue, 30 Aug 2011 12:45:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyRRZ-0006Vh-8U for guile-user@gnu.org; Tue, 30 Aug 2011 12:45:46 -0400 Original-Received: from world.peace.net ([96.39.62.75]:39425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyRRZ-0006UK-2U for guile-user@gnu.org; Tue, 30 Aug 2011 12:45:45 -0400 Original-Received: from 209-6-55-18.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.55.18] helo=yeeloong.netris.org) by world.peace.net with esmtpa (Exim 4.69) (envelope-from ) id 1QyRRJ-00026k-GN; Tue, 30 Aug 2011 12:45:29 -0400 Original-Received: from mhw by yeeloong.netris.org with local (Exim 4.72) (envelope-from ) id 1QyRR2-0006wr-7r; Tue, 30 Aug 2011 12:45:12 -0400 In-Reply-To: <20110829112725.GA12774@ccellier.rd.securactive.lan> (rixed@happyleptic.org's message of "Mon, 29 Aug 2011 13:27:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8751 Archived-At: 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