guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New syntax: (: MODULE-NAME VARIABLE-NAME)


From: Marius Vollmer
Subject: Re: New syntax: (: MODULE-NAME VARIABLE-NAME)
Date: Sun, 16 Nov 2003 18:31:36 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Neil Jerram <address@hidden> writes:

>     >> OK.  One other specification query: will `:' only work if the relevant
>     >> binding is exported?
>
>     Marius> Yes, I think that's more disciplined.
>
> For most uses I agree, but what about debugging (or introspection)
> code, [...]

Yes, that would be useful as well.

> Obviously a `:'-like macro for non-exported bindings could be
> implemented separately (I think it just needs resolve-module instead
> of resolve-interface), but I wonder if it's worth designing an
> interface now that neatly covers both possibilities.
>
> For example:
>     (: MOD-NAME VAR-NAME)  -> look up from exported bindings only
>     (: MOD-NAME VAR-NAME internal) -> look up from all bindings

Hmm, I would find it more natural to have a separate macro, like

      (:: MOD-NAME VAR-NAME)

where '::' would be the (to me) obvious choice of name.
Unfortunately, with (read-set! keyword 'prefix) that name would be a
keyword...

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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