guile-user
[Top][All Lists]
Advanced

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

Re: Please explain different macros


From: Neil Jerram
Subject: Re: Please explain different macros
Date: 23 Apr 2001 22:24:18 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Michael" == Michael Livshin <address@hidden> writes:

    Michael> this is not to say that these things shouldn't be
    Michael> documented at all -- of course they should.  in the
    Michael> developer documentation (wherever that is supposed to be)
    Michael> or something like that, but IMHO *not* in the user
    Michael> documentation.
    >>  You have a good point, but the user/developer distinction is
    >> one that simply doesn't exist yet in the reference manual.

    Michael> I thought the reference manual is strictly on the "user"
    Michael> side of things.  if it is not so, then I don't think I
    Michael> really have as good a point as I thought I had. ;)

I realized today that I probably misunderstood the distinction that
you are making.  Yesterday I thought "what's the difference between a
Guile user and someone who develops using Guile?"  Today, I guess that
by "developer" you mean someone (such as yourself) modifying Guile
itself.

In which case, I completely agree with you.  And I accept that there
is then a little confusion on this issue, notably in Part V of the
current manual because of the Data Representation chapter.  I'll be
getting around to Part V before too long, and will bear this issue in
mind.

Getting back to procedure->syntax and friends, though, I still think
that anything that is exported by the (guile) module should be covered
by the user documentation.  Currently there is no Scheme-level
distinction between `user' and `developer' stuff -- perhaps we need
one? 

    >>  I see; is that true for the implementation in Guile as well?

    Michael> it's tricky.

    Michael> the R5RS macros are implemented through the portable
    Michael> syntax-case implementation.  syntax-case pre-processes
    Michael> the Scheme source before it gets to the eval -- so it's
    Michael> kind of slow, and it processes all the code, even though
    Michael> your particular program may not excersize all the code it
    Michael> loads.

    Michael> defmacro/define-macro, on the other hand, are more
    Michael> "primitive".  you pay for them when the code that uses
    Michael> them goes through the memoizer -- i.e. on the first use
    Michael> at each call-site.  plus the memoizer is implemented in C
    Michael> and is thus supposed to be fast.

Thanks - interesting.

    Michael> I'd say the ideal situation (well, a certain, erm,
    Michael> extremely local maximum of "ideal") would be for a
    Michael> compiler to find its way into Guile before the reference
    Michael> manual is released. ;))))

That is very unlikely.  At least, I hope so; I presume the reference
manual will be released along with the next Guile release, which
hopefully will be quite soon.

        Neil



reply via email to

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