Decorators: an outsider's perspective

Chas Emerick cemerick at snowtide.com
Mon Aug 16 07:39:02 EDT 2004


On Aug 15, 2004, at 10:26 PM, Paul Morrow wrote:

>> I think the source of my gut reaction to the proposal you've advanced 
>> (aside from the conceptual action-at-a-distance violation that I 
>> already cited) is my past experience with Hungarian notation, where 
>> the name of a variable indicates its type.  The comparison isn't 
>> totally clean cut because of the special peculiarities of Hn, but I 
>> think the folly that it represents is a clear warning to stay away 
>> from taking type information based on naming conventions.
>
> I don't see your point about an 'action-at-a-distance' violation. 
> Wouldn't that only be the case if something we do locally has side 
> effects that break something in another part of the application?

In a previous message, I was talking about how a function declaration 
and that function's arguments are conceptually atomic, and that making 
any semantic connection between the two was conceptual 
action-at-a-distance.  It's a stretch of the term, but the best way I 
had to describe it at the time.

> As for the Hungarian notation, I agree that in its most abused state, 
> it can be a real mess for all sorts of reasons.   However in Python we 
> do use a very lightweight form of that in the way we identify private 
> and semi-private methods.

Ugh.  I know, and it's one of the little things about python that I am 
not so fond of.  It has the feel of something that GvM did in one of 
the earliest python scripts that just ended up catching on with a wider 
audience.  It screams 'accident', not 'designed'.  Please, no more of 
that.

- Chas Emerick




More information about the Python-list mailing list