From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: New syntax: (: MODULE-NAME VARIABLE-NAME) Date: Thu, 13 Nov 2003 19:12:01 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87brrgw32m.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068747611 32685 80.91.224.253 (13 Nov 2003 18:20:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2003 18:20:11 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 13 19:20:06 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKM4b-0003nx-00 for ; Thu, 13 Nov 2003 19:20:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKN0G-00030d-7o for guile-devel@m.gmane.org; Thu, 13 Nov 2003 14:19:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AKMz1-0002Pj-Bv for guile-devel@gnu.org; Thu, 13 Nov 2003 14:18:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AKMuM-0000qa-CZ for guile-devel@gnu.org; Thu, 13 Nov 2003 14:14:05 -0500 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKMuK-0000pQ-Ee for guile-devel@gnu.org; Thu, 13 Nov 2003 14:13:33 -0500 Original-Received: from dialin.speedway15.dip137.dokom.de ([195.253.15.137] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1AKLzX-00045F-00 for guile-devel@gnu.org; Thu, 13 Nov 2003 19:14:51 +0100 Original-Received: (qmail 22855 invoked by uid 1000); 13 Nov 2003 18:12:01 -0000 Original-To: guile-devel@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3010 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3010 Hi, what about making the changes below? The only unclean thing is that we would need to change the interpretation of a single ':'. The colon is such a natural choice, but we could avoid that uncleanliness by using some other symbol. Which one? ** The '-e' option now 'read's its argument. This is to allow the new '(: MODULE-NAME VARIABLE-NAME)' construct to be used with '-e'. For example, you can now write a script like #! /bin/sh exec guile -e '(: (demo) main)' -s "$0" "$@" !# (define-module (demo) :export (main)) (define (main args) (format #t "Demo: ~a~%" args)) ** A single ':' is always a symbol. Even with (read-set! keywords 'prefix). If you really want a keyword of length zero, write '#:'. ** New syntax ':': You can now directly refer to variables in a module by writing (: MODULE-NAME VARIABLE-NAME) For example (: (ice-9 pretty-print) pretty-print) will directly access the pretty-print variable in the (ice-9 pretty-print) module. You don't need to 'use' that module first. You can also use ':' with 'set!'. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel