Explanation of macros; Haskell macros

Anton van Straaten anton at appsolutions.com
Thu Oct 30 23:57:27 CET 2003


Peter Seibel wrote:
> Joachim Durchholz <joachim.durchholz at web.de> writes:
>
> > Peter Seibel wrote:
> > > Joachim Durchholz <joachim.durchholz at web.de> writes:
> > >
> > >>Efficiency issues aside: how are macros more intuitive than quoting?
> > > Or you could do this:
> > >   (when (> x y) #'(lambda () (print x)))
> > > which could work but seems a bit convoluted (i.e. unintuitive)
> > > compared to the macro version.
> >
> > Um, right, but that's just a question of having the right syntactic
sugar.
>
> Uh right, that's what macros are for, providing the syntactic sugar.

Yes, but the point is that with a concise syntax for lambda, entire classes
of macros can become unnecessary.  That's how Smalltalk handles 'if', for
example - no macros or special forms needed.







More information about the Python-list mailing list