Explanation of macros; Haskell macros

Kenny Tilton ktilton at nyc.rr.com
Tue Oct 7 00:13:50 EDT 2003


mike420 at ziplip.com wrote:
> I think others dropped the ball while trying to explain macros
> to non-Lispers recently. 

...<snip>

> Let's say you do not have the "for" keyword, but you have
> "dolist" for iterating a list and "dotimes" - a simple 
> index loop. You want to create "for" just like in Python, 

Wow, talk about dropping the ball. Translation: "You should learn Lisp 
because it has macros so you can recreate Python in Lisp and not learn 
Lisp."

If you want to be an educator, you gotta motivate your students. Your 
macro was fine in all regards except that its motivation ("avoid Lisp by 
learning advanced Lisp!") is, um, unconvincing.

kenny






More information about the Python-list mailing list