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

Re: need for macros (was Re: Icon)





> From: Matthias Felleisen <matthias@ccs.neu.edu>
> Date: Sat, 22 Dec 2001 14:41:43 -0500 (EST)
> 
> Scheme 84 had this, and I don't see why this isn't in most Lisps. 
> 

? Do you mean Scheme 48?

> Still, I believe that some features should not be in programming languages
> because neither the designers nor the super programmers nor the average
> programmers know how to reason about them systematically. I have come to
> believe that 3D macros are one such thing. They co-mingle two radically
> different phases: compilation and execution. You cannot possibly deploy a
> program that is expanded like that on a different machine. The very idea
> doesn't make sense. I guess in short, I believe in the strict separation of
> passes. Otherwise I am open to pretty much everything :-) 

By "3D macros", do you mean non-hygienic defmacro-style macros?

Also, I don't see why you can't deploy such macros on a different machine,
as long as certain ground rules are the same (such as, I suppose, order of
evaluation).  Aren't common lisp macros reasonably portable?

Mike


> 
> -- Matthias
> 
>   > Date: Fri, 21 Dec 2001 15:38:55 -0800 (PST)
>   > From: Paul Graham <paulgraham@yahoo.com>
>   > Cc: ll1-discuss@ai.mit.edu
>   > Content-Type: text/plain; charset=us-ascii
>   > 
>   > 
>   > --- Matthias Felleisen <matthias@ccs.neu.edu> wrote:
>   > > 
>   > > Yes, Dan used to assign this as a puzzle in 1983/84 and I posed it to
>   > > Guy
>   > > at my first POPL: it's called ONCE. You are creating a 3-dimensional
>   > > value
>   > > that tunnels its way from expansion to run-time. Is this a good
>   > > thing? 
>   > 
>   > Sure, why not?  It solves my problem in this case, and solving
>   > problems is what language are for.  
>   > 
>   > In Arc it is explicitly part of the language that you can insert
>   > objects (not just expressions) into macroexpansions.  Also 
>   > that anything that isn't a list or a symbol evaluates to itself.
>   > 
>   > I'm not sure if/which other Lisps have done this before, but
>   > it gives you a small but significant boost in expressive power.
>   > It may also help make programs faster, because it means you
>   > can build things at compile time that would otherwise have to
>   > be built at runtime.
>   > 
>   > Of course if people don't want to do this they don't have to.
>   > Arc's philosophy is, let the programmer decide.
>   > 
>   > --p "Arc: It's not just free, it's libertarian!" g
>   > 
>   > 
>   > __________________________________________________
>   > Do You Yahoo!?
>   > Send your FREE holiday greetings online!
>   > http://greetings.yahoo.com
>   > 
> 
>