guile-user
[Top][All Lists]
Advanced

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

Re: and-let* is not composable?


From: Panicz Maciej Godek
Subject: Re: and-let* is not composable?
Date: Sat, 5 Oct 2013 00:27:27 +0200

If you, or the other people who are confused by syntax-case, can point
to the parts of the manual that confuse you, so we can clear them up, I
think we'd all appreciate it.

Fundamentally, syntax-case shouldn't be harder to use than define-macro
99% of the time, if you remember

As a little addendum to that topic, I just ran across Matthew Flatt's
presentation of Racket macro system, http://www.infoq.com/presentations/racket,
where he points to a quite good introduction to "define-syntax" macros
by Greg Hendershott: http://www.greghendershott.com/fear-of-macros/

And now that my head is clearer on this regard, I think it is confusing
to call them "syntax-case" macros, because "syntax-case" is rather
auxiliary than essential for defining that sort of macro.

The order of presentation in the manual resembles the one that Hendershott
criticises, namely: first, the syntax-rules macros are presented, which are an
epiphany once you comprehend them, and then syntax-case is presented as
a different type of macro. However, syntax-case is only a pleasant way to
destructure syntactic information passed to a transformer, and the same
effect could be achieved without using it, by using some more explicit 
procedures like syntax->datum. (Furthermore, Hendershott explains
more specifically how do the syntax objects differ from raw scheme forms).
So I believe that at least placing a link to than explanation in the manual
could be a great help for beginners.

Best regards,
M.


reply via email to

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