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: 22 Apr 2001 14:39:07 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Marius" == Marius Vollmer <address@hidden> writes:

    Marius> Neil Jerram <address@hidden> writes:
    >> >>>>> "Marius" == Marius Vollmer <address@hidden> writes:
    >> 
    Marius> [... explanation of macros ...]
    >>  I hope you don't mind if I snarf all of these explanations for
    >> the reference manual?

    Marius> No, of course not.  But let me add that I think that
    Marius> `acros' and `macros' are obscure stuff and shouldn't be
    Marius> advertised too much.

Yes - I understood that from the tone of your previous posts.  But
procedure->* must be in the reference manual, for completeness.  I'll
put them in a section called `Low-level ...', or something similar.

    Marius> advertised too much.  For `mmacros', the interface should
    Marius> be `defmacro' or `define-macro', but we should in any case
    Marius> work on making `define-syntax' more attractive.  (People
    Marius> say `define-syntax' is slow.)

I prefer define-syntax myself, but I don't have any
performance-critical Guile applications to worry about.

    Marius> `define-macro' is just

    Marius>     (defmacro define-macro (name-and-args . body)
    Marius> `(defmacro ,(car name-and-args) ,(cdr name-and-args)
    Marius> ,@body))

    Marius> that is, this

    Marius>     (defmacro NAME (ARGS...) BODY...)

    Marius> is the same as this

    Marius>     (define-macro (NAME ARGS...) BODY...)

    Marius> The difference is analogous to the difference between
    Marius> `defun' and `define'.

Great - thanks!

        Neil



reply via email to

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