do...until wisdom needed...

Alex Martelli aleaxit at yahoo.com
Fri Apr 20 10:34:53 EDT 2001


"Neelakantan Krishnaswami" <neelk at alum.mit.edu> wrote in message
news:slrn9dv4m7.68t.neelk at alum.mit.edu...
    [snip]
> >> > Yes, 'hygienic macros' WOULD help cut these discussions short.  Pity
    [snip]
> >> I note that precisely the same argument can be made about adding
> >> functions to a language.
> >
> > Reality easily proves that your "note" is a falsehood: despite the
> > existence of functions in Python, Usenet STILL buzzes with long
> > discussions by people who whine about Python not having their
> > favourite doodad.  Their existence doesn't cut these discussions
> > short.  So, how can you make this statement?
    [snip]
> No, the difference between functions and macros is not at all clear.

Briefly: macros generally allow more alteration of surface syntax.
Most people crave syntax sugar.  If it isn't in the surface syntax,
then for them it does not exist, and therefore can't "cut short" any
of their discussions

> introducing a macro system is to add a synonym for lambdas and
> function application.

"Synonym" may be a concise way to spell "different syntax sugar".


> of inline functions or macros. Furthermore, it's a very common style
> in Scheme to write a higher-order function and then provide a macro as
> syntactic sugar for it, relying on the compiler to eliminate the
> unneccessary closure allocation.
>
> Theory, compiler engineering, and programming practice all coincide
> here; I don't know of any more convincing argument that the presence
> or absence of a macro system is a matter of engineering and user
> interface design, not of any fundamental semantic differences.

I did not mean to impugn this assertion and apologize if I
seemed to be doing so.  But this has nothing to do with
"the argument", which, as above quoted, starts out with the
dream of "cutting these discussions short".


> The engineering considerations are vitally important, of course.  I

Bingo.  No sugar, no short-discussion-cutting.

> I'm really surprised you consider any of this controversial.

I don't consider "any of this" controversial -- starting
with my assertion that having macros "WOULD help cut these
discussions short", and the fact that this argument does
not apply to functions due to insufficient sugariness.

Hmmm, actually, maybe if we DIDN'T have functions in
Python the discussions would be cut short -- as too few
people would be using it to keep critical mass on a
newsgroup or mailing list!-)


Alex






More information about the Python-list mailing list