[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: namespaces, goops, etc.
From: |
thi |
Subject: |
Re: namespaces, goops, etc. |
Date: |
Fri, 3 Nov 2000 13:29:45 -0800 |
From: "Lars J. Aas" <address@hidden>
Date: Fri, 3 Nov 2000 21:40:20 +0100
Where is `export' documented? Couldn't find any references to it
anywhere...
i couldn't either, but here is the relevant entry from the ChangeLog:
1998-07-16 Mikael Djurfeldt <address@hidden>
* boot-9.scm (export, export-syntax): New special forms: Export
bindings from a module. `(export name1 name2 ...)' can be used at
the top of a module (after `define-module') to specify which names
should be exported. It can be used as an alternative to
`define-public'. `export-syntax' works equivalently to `export'
but is intended for export of syntactic keywords.
to be fair, i just tried to abuse `export' in the same way
`define-public' can be abused (see below). guile didn't complain, but
the specified binding was not exported, so i guess there's some measure
of safety in using `export' over `define-public'...
thi
________________________
;;; random.scm
(define-module (my module))
(define (blah) #t)
(define (nothing-is-real)
(export blah)
#t)
(export nothing-is-real)
______________________________
guile> (version)
"1.4.1"
guile> (load 'random.scm)
guile> (use-modules (my module))
guile> nothing-is-real
#<procedure nothing-is-real ()>
guile> blah
ERROR: In expression blah:
ERROR: Unbound variable: blah
ABORT: (unbound-variable)
guile>
- Re: namespaces, goops, etc., (continued)
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
- Re: namespaces, goops, etc., Jost Boekemeier, 2000/11/03
- Re: namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc., thi, 2000/11/03
- Re: namespaces, goops, etc., Jost Boekemeier, 2000/11/03
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/03
- Re: namespaces, goops, etc., thi, 2000/11/03
- Re: namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc.,
thi <=
- Re: namespaces, goops, etc., thi, 2000/11/03
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/03
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
- Re: namespaces, goops, etc., Mark Seaborn, 2000/11/11
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/17
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/17