Dave Herman dherman at
Thu Aug 28 18:55:58 PDT 2008

Felix wrote:
> ingvar-sugar isn't a macro system.  it's pretty similar to python's 
> @decorator syntax.

Yeah, you're right -- IIUC it's very much like Python decorators, though 
not class decorators but function decorators, right? IANA Python expert.

Ingvar, I've read your proposal more carefully. If I'm reading it right, 
I think your description is off a meta-level-- it's not so much a 
general syntactic sugar mechanism as a way of defining one specific kind 
of sugar: a function decorator. Basically, a decorator is syntactic 
sugar for function composition. The first thing I'd change is to replace 
the "sugar" keyword with "decorator." I think this would make its 
purpose clearer and connect it with precedent from other languages.

I guess I don't have much of a reaction... I understand people get a lot 
of mileage out of Python decorators, but if it came down to choosing 
between decorators and macros, I'd take macros. Regardless, I don't 
think we've been considering meta-programming facilities to be on the 
near-term agenda.


More information about the Es-discuss mailing list