On Tue, May 3, 2011 at 9:42 PM, Andrzej <[email protected]> wrote:
> 1. (one I mentioned before) Is it just me who thinks that it is a bad > idea to have same quasiquote forms expand correctly in one context and > fail in another? > You're referring to the fact that "(unquote 1 2)" is sometimes legal or not, depending on what's surrounding it, right? I might agree if I thought UNQUOTE and UNQUOTE-SPLICING were actual syntactic forms, like QUOTE or DEFINE-SYNTAX. But really, they're just literal identifiers which QUASIQUOTE looks for when it walks its input form (like ELSE and => for COND). > 2a. As a performance optimization. Imagine that "macro-apply" expands > to some complex expression. It is usually cheaper to evaluate: > (some-procedure (macro-apply some-contents)) > than: > (some-procedure (macro-apply-car some-contents) (macro-apply-cadr > some-contents) (macro-apply-caddr some-contents)) > Interesting idea. Note that if you merely move the name SOME-PROCEDURE into the argument list of MACRO-APPLY, then the macro can return just one form and achieve the same effect.
_______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
