Explanation of macros; Haskell macros

Lex Spoon lex at cc.gatech.edu
Tue Oct 28 18:03:23 EST 2003


"Robert Klemme" <bob.news at gmx.net> writes:
> Just for the sake of my understanding: could one summarize this as "macros
> make control of *when* something is evaluated easier"?  I mean, marco
> arguments are not evaluated before the macro "call" as opposed to function
> arguments.  With that, you can decide inside the macro, how you treat
> those arguments and if you evaluate them at all.  Thx!


Yes, that's one big advantage.  If you are willing to do everything at
runtime, then HOF plus a nice general syntax for literals
(e.g. s-expressions) give you the same thing.


-Lex




More information about the Python-list mailing list