guile-devel
[Top][All Lists]
Advanced

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

Re: Waddell/Dybvig module system


From: Michael Livshin
Subject: Re: Waddell/Dybvig module system
Date: 15 Jan 2001 13:51:02 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake)

Neil Jerram <address@hidden> writes:

>     Michael> gives me a *massive* headache, for some reason.
> 
> Yeah; I just tried to reread the syntax-case section in Dybvig's book,
> and it stumped me again.  A good rule of thumb, though, seems to be:
> if in doubt, add another `(syntax ...)'. :-)

well, on the third reading the Wadell's thesis (currently ;) I don't
find the `(syntax ...)' stuff problematic at all.  the thing that does
worry me is the fact that in order to use the more powerful bits of
the macro system (like intentional capture), one has to make a
conceptual leap, and start thinking not in terms of pattern matching
and symbol substitution, but in terms of visibility, renaming,
beta-reduction etc.

while I'm quite sure that the members of this august forum are able to
make the leap when needed, I'm not happy with the perceived (by
myself, that is) usability of the system.  perhaps it would help if I
wasn't "spoiled" by the traditional Lispy macros, but I am.

I hope the above was coherent.

>     Michael> (defmacro use-modules names
> 
>     Michael>   (define (use-one-module name) `(module*
>     Michael> ,(read-interface name) (include ,(module-body-file-name
>     Michael> name))))
> 
>     Michael>   `(begin ,@(map use-one-module names)))
> 
> Hmmm.  I think that this would work, but I believe that read-interface
> and include are going to need both side-inputs (I mean the opposite of
> side-effects, or stuff that is not present in the macro call, i.e. the
> contents of the interface file) and those things like
> datum->syntax-object - to construct interface identifiers with the
> right lexical context - that are verging on the unhygienic (or perhaps
> are actually unhygienic - I've not yet found out what hygienic exactly
> means).  It seems strange that it is necessary to use such
> non-mainstream bits of the module+syntax-case system to implement the
> most basic requirements of a practical module system.

why is that strange?

the system is simply not powerful enough (or very cumbersome) without
`datum->syntax-object' and `fluid-let-syntax' and
`syntax-object->datum'.

those construct are not unhygienic by themselves, but they surely can
be (mis)used to get weird effects.

-- 
Klingon function calls do not have 'parameters' -- they have
'arguments' -- and they always win them.
                                        -- Klingon Programmer




reply via email to

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