decorators - more than just syntactic sugar

Michele Simionato michele.simionato at gmail.com
Tue Aug 14 00:58:41 EDT 2007


On Aug 13, 7:46 pm, Alexander Schmolck <a.schmo... at gmail.com> wrote:
> Michele Simionato <michele.simion... at gmail.com> writes:
> > Well, I argued may times that syntactic sugar is important (all Turing
> > complete languages differs by syntactic sugar only)
>
> Although I agree that "mere" syntactic sugar matters, I think you're
> overstating the point. I would argue that most people would understand
> syntactic sugar as equivalent to a (very) localized program transformation.
> Things like first class continuations clearly aren't syntactic sugar in that
> sense.
>
> 'as

I don't think I am overstating my point. I am just pointing out
a sloppiness in the definition of "syntactic sugar". You are right
that most people understand it as °a somewhat trivial
program transformation". However most people tend to forget that
by a succession of somewhat trivial program transformations you
can get quite a lot. Look, a compiled language is just a whole big lot
of syntactic sugar over assembly language!
An even continuations can be implemented in terms of macros. the
quintessence of syntactic
sugar (as you know better than me). You are right that this
require a global program transformation, it is a kind of heavy
duty syntactic sugar, but still it is always syntactic sugar
at the end. Then, you may decide that you want to use a different
name from global program transformation, since syntactic sugar
sounds diminutive, but then it is an issue of names ;)

        Michele Simionato




More information about the Python-list mailing list