[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patches from ttn's tree to Guile CVS
From: |
Marius Vollmer |
Subject: |
Re: Patches from ttn's tree to Guile CVS |
Date: |
Tue, 09 Mar 2004 21:36:28 +0100 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Clinton Ebadi <address@hidden> writes:
> Is there any chance of these ever being merged?
About the extended_e.patch.bz2: Guile CVS has a similar mechanism
(inspired by ttn's extended '-e' option). I find this way of doing
things cleaner since we now have a single way to directly refer to
variables in their modules.
The 'design discussion' (cough) starts here:
http://mail.gnu.org/archive/html/guile-devel/2003-11/msg00050.html
Also see the thread at
http://mail.gnu.org/archive/html/guile-user/2003-10/msg00002.html
Excerpt from NEWS:
** 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))
* Changes to Scheme functions and syntax
** New syntax '@' and '@@':
You can now directly refer to variables exported from a module by
writing
(@ MODULE-NAME VARIABLE-NAME)
For example (@ (ice-9 pretty-print) pretty-print) will directly access
the pretty-print variable exported from the (ice-9 pretty-print)
module. You don't need to 'use' that module first. You can also use
'@' with 'set!'.
The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
but it can also access variables that have not been exported. It is
intended only for kluges and temporary fixes and for debugging, not
for ordinary code.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
- Re: Patches from ttn's tree to Guile CVS, (continued)
guile-core in Arch archive [was: Patches from ttn's tree to Guile CVS], Andreas Rottmann, 2004/03/10
Re: Patches from ttn's tree to Guile CVS, Thamer Al-Harbash, 2004/03/10
Re: Patches from ttn's tree to Guile CVS, Marius Vollmer, 2004/03/10
Re: Patches from ttn's tree to Guile CVS, Marius Vollmer, 2004/03/10
Re: Patches from ttn's tree to Guile CVS, Marius Vollmer, 2004/03/11
Re: Patches from ttn's tree to Guile CVS,
Marius Vollmer <=