Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PEP 318 decorators are not Decorators

Reply
Thread Tools

PEP 318 decorators are not Decorators

 
 
Arthur
Guest
Posts: n/a
 
      08-16-2004
On Sun, 15 Aug 2004 18:29:52 GMT, Arien Malec
<(E-Mail Removed)> wrote:

>Skip Montanaro <(E-Mail Removed)> wrote in
>news:(E-Mail Removed):
>
>>
>> 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
>> included).
>>
>> 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.

Art



 
Reply With Quote
 
 
 
 
Arien Malec
Guest
Posts: n/a
 
      08-16-2004
"Colin J. Williams" <(E-Mail Removed)> wrote in
news:Ns3Uc.5169$(E-Mail Removed):
> Arien Malec wrote:
>> 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.


> This is especially confusing as, in everyday english usage, to
> decorate is not the same as to transform.
>
> Perhaps "transform" could be consdered as an alternative.


That would be my leaning, as well. Ideally, the name would make it clear
that the application order of the transformations is significant....

Arien
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
final version of PEP-318 "Decorators for functions and methods" Anthony Baxter Python 0 09-03-2004 09:34 AM
pep-318 questions Hallvard B Furuseth Python 3 08-28-2004 04:42 PM
Confused about pep 318 Edward K. Ream Python 45 08-06-2004 10:41 PM
RE: Decorator syntax (was Re: PEP 318 - PyFIT comments) Delaney, Timothy C (Timothy) Python 16 08-06-2004 07:03 PM
PEP 318 - PyFIT comments John Roth Python 7 08-06-2004 02:04 PM



Advertisments