Decorators

Arthur ajsiegel at optonline.com
Sat Aug 7 23:10:18 EDT 2004


On Sat, 07 Aug 2004 18:40:47 -0400, Roy Smith <roy at panix.com> wrote:

>"Colin J. Williams" <cjw at sympatico.ca> wrote:
>> It seems desirable that we choose words which are as close as possible 
>> to their everyday usage.
>
>On the other hand, it's desirable to pick words which have established 
>meanings in computer science too.  The concept of a "decorator" is 
>pretty well established.  The term has been used in GUI frameworks for 
>10 or 15 years, and more recently has been enshrined in various pattern 
>collections.

My one line answer to the question of what it is I like about Python
is:

"""
It is literate without being effete.  
"""

I can live with "decorator", because it is a word without a particular
meaning to me (in this general realm), and I can fill in that blank by
an understanding of what it means in concrete terms in Python.  But it
disturbs me (mildly) to see it justified by something like the Gang of
Four reference or GUI framework stuff. 

I have no compelling reason to read the GOF material.  But feel myself
to be rarefied (by walking around kind of folks statndards) by
understanding, broadly, the reference. I can think of numbers of folks
I know who make a living in  IT related work, and for whom I am
confident the reference would draw a blank.
.  
I've written (simple) GUIs and never heard the word decorator used in
that context.

This is getting to be pretty effete stuff for a language that strives
to be for everybody.  Or is that silliness finally off the table. 

.
Standalone the issue of the justification of the word
"decorator"wouldn't motivate me to comment. 


But then I just read something defending  '@'  because it evokes
"prepocessor". Which also then justifies, I guess, its position
relative to what it processes.

But it also - is it not - the thingy that proceeds "aol.com" when
writing to manny_man.

I am a great believer in (motivated ) folks capacity to learn new
things.  And the existence of synonyms is not news to anyone. So no,
nobody motivated to learn new things will be stopped in their tracks
by @ in a new context (anymore than anyone motivated to learn new
things things would - given an explanation  - be stopped in their
tracks by 1/2 = 0 ).

But there is something a bit effete about a confident statement that
'@' is consistent with prepended information by referencing its use
(somewhere apparently) to hold prepocessor directives.. 

The less effete argument, it seems to me, is the opposite,  The method
is the addressee, the decorator the address.  The @ therefore belongs
between them - at the top of the body of the method.  Not before it.

Art



More information about the Python-list mailing list