chicken-users
[Top][All Lists]
Advanced

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

Re: Re: [Chicken-users] New to Scheme Macros


From: John Cowan
Subject: Re: Re: [Chicken-users] New to Scheme Macros
Date: Wed, 22 Apr 2009 17:47:24 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Jordan Cooper scripsit:

> Yes, that is interesting. I noticed in the examples on the wiki that
> they were calling the rename procedure even for identifiers like
> "lambda", which looked different coming from CL macros.

Sure.  Nothing says you can't do (let ((define 1) lambda 2) (if 3) (cons 4) ...)
in Scheme.  It's deeply weird, but it's legal.

It more often comes up with things like "list", used as the name of a
parameter in a function that expects a list.  Of course, if you do that,
you can't call the global function "list" in your code, but hygienic
macros that you invoke still can.  Another case would be a sorting
routine that accepts a less-than function as a parameter: calling that
parameter "<" makes the code easy to read.

I kind of regret that Felix didn't provide syntactic-closures macros
as well as explicit-renaming.  In syntactic-closures, everything is
renamed by default, and you have to turn off renaming where you need it
turned off.

-- 
Even a refrigerator can conform to the XML      John Cowan
Infoset, as long as it has a door sticker       address@hidden
saying "No information items inside".           http://www.ccil.org/~cowan
        --Eve Maler




reply via email to

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