PEP 318 decorators are not Decorators
ajsiegel at optonline.com
Mon Aug 16 17:54:13 CEST 2004
On Sun, 15 Aug 2004 18:29:52 GMT, Arien Malec
<arien_malec at yahoo.com.REMOVE> wrote:
>Skip Montanaro <skip at pobox.com> wrote in
>news:mailman.1662.1092523102.5135.python-list at python.org:
>> Arien> 3) Won't most programmers think GoF decorators before
>> Arien> compiler syntax tree decorators?
>> Skip> Not if they are unfamiliar with the GoF patterns (myself
>> Arien> Google: [~62,000 : ~130 mentions of each sort of decorator]
>> BFD.... The thing is, just because in a verbal Rohrschach
>> test you think "GoF" when someone says "decorator" doesn't mean
>> everybody else will (or should).
Correct. I would think simply that "decorate" would be descriptive in
its own right.
As obscure as the GOF reference might be to some, the alternative
references justifying the naming seem to be off the map in terms of
obscurity. So let's assume a blank slate. And all we want is the
word to be descriptive.
And it seems to me the naming is in fact descriptive - but of the
syntax, not the functionality.
Which is OK, I guess, if we accept it as that.
As there are already a number of compromises being made in the
addition of this to the language, I just think of this as one more.
>Clearly, Python can choose any name for the auto-function-transformation
>syntax in question, but it's rather willfully confusing to choose a name
>that's heavily identified with a profoundly different semantics that's
>superficially similar in intent.
Again, a little different if we think of it as describing the syntax,
not the functionality. Yes the ambiguity, I agree, is bad. And yes,
I agree, willful, to an extent. Or at least willful to the extent that
there is little interest in truly justifying the choice of
terminology, and specifung whether we are referencing the syntax or
the functionality in the choice of the terminology.
This ambiguity is to the essence of decorators, maybe both as syntax
and as functionailty. But it is not the first time I have issues with
python-dev folks using ambiguity as gloss.
More information about the Python-list