Jon Harrop wrote: > Outside Lisp, macros are for syntax. Evaluation semantics (e.g. lazy > evaluation) then have nothing to do with macros.
I don't think that's entirely true. With currying and lazy evaluation, there's a sense in which Haskell function definitions already *are* macros. There are limits to the degree of syntactical transformation you can reasonably achieve -- it wouldn't be easy to make Haskell code look exactly like Cobol, for example. But usually that's not what you're after -- rather you just want to devise some way to express your intent with a minimum of boilerplate. I once implemented a parser in HUGS. Using nothing but built-in language features, I was able to construct a system whereby I could more or less just write down the BNF grammar rules and feed them straight into the HUGS compiler. Achieving a similar trick in Lisp would probably have required using macros. -- Greg -- http://mail.python.org/mailman/listinfo/python-list