Felix wrote:
> ingvar-sugar isn't a macro system.  it's pretty similar to python's 
> @decorator syntax.  http://www.python.org/dev/peps/pep-3129/

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

     http://www.python.org/dev/peps/pep-0318/

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.

Dave
_______________________________________________
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to