Why we will use obj$func() often

Donn Cave donn at u.washington.edu
Wed Apr 28 17:21:18 EDT 2004


In article <52Ujc.16275$Qy.3111 at fed1read04>,
 "Mark Hahn" <mark at prothon.org> wrote:

> Donn Cave wrote:
> > In article <5vJjc.13116$Qy.1954 at fed1read04>,
> 
> > Well, in a sense this (&var) is a simplistic avoidance of scope.  Scope
> > is how unqualified identifiers are resolved.
> 
> Scope is a noun, not a verb.  To me a scope is just a namespace defined by
> syntax.  There are many ways to specify what scope a var belongs in, and
> qualification using &var is just as valid as any other.

Whatever you want scope to mean, that's up to you, but let's
observe that whatever you want to call it, programming languages
have in common a need to resolve multiple occurrences of an
identifier without syntactical aids, and some of them manage
to do it just fine in a fairly complex code structure.

> > As I said there, declaration isn't an interesting part of that,
> > but the idea that declarations are "not Pythonic" strikes me as
> > particularly absurd (not to mention just seeing you, of all people,
> > offer this criticism.)
> 
> I didn't mean to be critical, just stating pros and cons.
> 
> > What is "class"?
> 
> Be fair.  You know that I didn't throw out classes on a capricious whim.

I actually had forgotten that you threw out class, that's not
my point.  Declarations are "Pythonic", because Python code is
necessarily full of declarations.  When you reject a solution
because it's "not Pythonic", that is structurally a criticism.
I don't care how you rationalize your preferences in these
matters, really, and it might be that you would do better to
leave that part alone and just state your preferences.  There's
nothing more inflammatory in a place like this than an absurd
proposition.

> I go through crazy moments where I consider every possibility and throw out
> ideas.  I considered the idea of replacing def with func (def is misnamed
> after all) and that proposal lasted about 30 minutes.  Another idea that
> lasted about 45 minutes was changing __init__ to init.  Please don't hold
> anything against me during these trial-idea times.  Wait until you see the
> final Prothon before you criticize my wanton destruction of the Python
> heritage.  It also wouldn't hurt to hear you voice on the Prothon mailing
> list influencing the outcome.

You can't afford to indulge my tastes in programming languages,
because the result would be utterly foreign to Python users.
I use Python because it works.  Roughly the 2.0 subset of the
language is all I know and seem to need to know to make programs
work.  When I dream of a better language, it's not pasting new
gimmicks on Python, it's really a radically different direction.
OOP languages are today's FORTRAN.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list