From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: Re: illegal uses of define in guile Date: Tue, 15 Oct 2002 14:45:20 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20021015124520.GA513@www> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034684897 31661 80.91.224.249 (15 Oct 2002 12:28:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2002 12:28:17 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 181Qo4-0008EW-00 for ; Tue, 15 Oct 2002 14:28:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 181Qnv-0002bx-00; Tue, 15 Oct 2002 08:28:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 181Qnc-0002SF-00 for guile-devel@gnu.org; Tue, 15 Oct 2002 08:27:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 181QnZ-0002RZ-00 for guile-devel@gnu.org; Tue, 15 Oct 2002 08:27:46 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by monty-python.gnu.org with esmtp (Exim 4.10) id 181QnX-0002P9-00 for guile-devel@gnu.org; Tue, 15 Oct 2002 08:27:44 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 83B191049BA; Tue, 15 Oct 2002 14:45:20 +0200 (CEST) Original-To: Dirk Herrmann Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1557 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1557 On Mon, Oct 14, 2002 at 07:17:03PM +0200, Dirk Herrmann wrote: > Hi, > > (I have been quiet for some time because I was on vacation.) > > with respect to defines and top level forms, I would like to point out the > following issue (which may also be of relevance for the ideas you discuss > in the file new-model.txt, Marius). > > Currently, guile allows the following: > (if (not (defined? '%load-verbosely)) > (define %load-verbosely #f)) > as can be found in r4rs.scm. > > This is in contrast to R5RS (maybe even already in contrast to R4RS, > but I haven't checked that). Allowing such placements of define will make > it impossible to determine statically whether after evaluation of the > form the corresponding identifier will be bound or not. That is, we > should disallow this behaviour. Hmm, doesn't the above imply that the side-effect' of 'define' is static? What about code like the following: (use-module (ice-9 safe)) (define my-context (current-module)) (if some-weird-condition (set! my-context (make-safe-module))) ;; the side-effect of define here will depend on ;; the boolean interpretation of 'some-weird-condition' (eval (define car #f) my-context) ;; or, even meaner ... (define (nodefine sym val) (display "Safe environ: no (re)definition allowed!\n")) (eval (define define nodefine) my-context) Maybe a bit constructed but i can well imagine similar usefull situations. Ralf Mattes _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel