Python syntax in Lisp and Scheme

Andreas Rossberg rossberg at ps.uni-sb.de
Thu Oct 9 09:37:30 EDT 2003


Raymond Wiker wrote:
>>
>>I'm not terribly familiar with the details of Lisp macros but since
>>recursion can easily lead to non-termination you certainly need tight
>>restrictions on recursion among macros in order to ensure termination
>>of macro substitution, don't you? Or at least some ad-hoc depth
>>limitation.
> 
>         Same as with function calls, you mean?

In functional languages you at least have no limitation whatsoever on 
the depth of tail calls. Is the same true for macros?

Apart from that, can you have higher-order macros? With mutual recursion 
between a macro and its argument? That is, can you write a fixpoint 
operator on macros?

I'm not saying that any of this would be overly useful. Just trying to 
refute Dirk's rather general statement about macros subsuming HOF's.

	- Andreas

-- 
Andreas Rossberg, rossberg at ps.uni-sb.de

"Computer games don't affect kids; I mean if Pac Man affected us
  as kids, we would all be running around in darkened rooms, munching
  magic pills, and listening to repetitive electronic music."
  - Kristian Wilson, Nintendo Inc.





More information about the Python-list mailing list