[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:35:27 +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:

Also see the thread at

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


    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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]