newbie: self.member syntax seems /really/ annoying

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Sep 14 00:14:51 CEST 2007


On Thu, 13 Sep 2007 13:14:25 -0400, J. Clifford Dyer wrote:

> On Thu, Sep 13, 2007 at 04:21:36PM -0000, Steven D'Aprano wrote
> regarding Re: newbie: self.member syntax seems /really/ annoying:
>> 
>> It's not just a matter of taste.
>> 
>> Reading comprehensibility is an objective, measurable quantity, and I
>> would bet that "(self.foo + self.bar) * self.baz" would be measurably
>> more readable on average than either of your two alternatives _even for
>> those people who claim to hate it_.
>> 
>> 
> It may be measurable, but it is also contextual.  Depending on what
> you've been trained in, one way or the other might be more readable. 
> For a teenager in a major city, tagging is far more readable than a
> Fraktur font, but for Mad King Ludwig, it was certainly quite the
> opposite.

Cliff, we're discussing Python programming, not Java programming or 
assembly language programming or tagging trains. Let the damn taggers 
invent their own programming language and stop graffiti-ing Python.

And speaking of readability... your post shows up in my news reader with 
each paragraph as a single, long, long LONG line scrolling about five 
full screens to the right. Please configure your software to follow the 
Usenet convention of putting newline characters at the end of each line, 
or every 72 (?) characters, whichever comes first.

> Moreover, it may be that the best solution is to stop trying for an
> object-oriented solution.  Why not use a functional programming style to
> represent mathematical functions?

Go back to the beginning of the thread, and you'll see that that's just 
what I suggested.



-- 
Steven.



More information about the Python-list mailing list