unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* New syntax: (: MODULE-NAME VARIABLE-NAME)
@ 2003-11-13 18:12 Marius Vollmer
  2003-11-13 19:47 ` Neil Jerram
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Marius Vollmer @ 2003-11-13 18:12 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2003-11-17 21:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-13 18:12 New syntax: (: MODULE-NAME VARIABLE-NAME) Marius Vollmer
2003-11-13 19:47 ` Neil Jerram
2003-11-13 20:58   ` Marius Vollmer
2003-11-14 21:04     ` Neil Jerram
2003-11-15 15:19       ` Marius Vollmer
2003-11-15 19:22         ` Neil Jerram
2003-11-16 17:31           ` Marius Vollmer
2003-11-16 18:20             ` Neil Jerram
2003-11-16 18:38               ` Neil Jerram
2003-11-16 20:36                 ` Marius Vollmer
2003-11-17 20:18                   ` Neil Jerram
2003-11-17 21:34                     ` Marius Vollmer
2003-11-16 20:28               ` Marius Vollmer
2003-11-14 22:09 ` Mikael Djurfeldt
2003-11-15 15:10   ` Marius Vollmer
2003-11-17  2:00     ` Mikael Djurfeldt
2003-11-17 14:41       ` Marius Vollmer
2003-11-16  8:02 ` Dirk Herrmann
2003-11-17 14:44 ` New syntax (@ MODULE-NAME VARIABLE-NAME) committed Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).