static variables?

Terry Reedy tjreedy at udel.edu
Thu Nov 21 12:40:56 EST 2002


"Erik Max Francis" <max at alcyone.com> wrote in message
news:3DDC1874.F72E2B35 at alcyone.com...
> Terry Reedy wrote:
>
> > If I understand this, you are proposing that if a default is
> > 'mutable', then extra magic be added to re-initialized (somehow)
on
> > every call.
>
> I am doing no such thing.

Ok, you are 'proposing' that extra magic is *possible*, that it
*could* be added,  or rather, have been added from the beginning.

> I am simply stating that there is no a priori
> reason why it _couldn't_ have been done that way.

Given that we all know that anything programmable could be done, the
above does not say anything.  I thought you were saying something more
(ie, that there is a plausibly good and not just possible
alternative).

>  It wasn't done that way, and I am not suggesting it be changed,

OK, actual change of the language is a non-issue.

> just justifying my position that the way it's done right now is an
arbitrary choice

I presume you mean 'was', referring to the original choice rather than
'is', referring to the continual choice not to change, which we agree
on as rational (and to me, therefore, non-arbitrary).

To make a concrete choice, there must be a concrete alternative.  As I
explained in my previous post, your other 'way' that defaults could
have been handled covers many possibilities.  I interprete you as
saying that at least one of the underspecified alternatives would have
been just as rational a choice, had GvR but thought of it and
considered it.

'Arbitrary' has a range of meanings and connotations from
discretionary, according to preference, through whimsical, capricious,
or random, to despotic or dictatorial.  I'll let you clarify which you
mean, if you wish, before arguing this point much further.

> (simply because it is the easiest to implement).

If arbitrary means random (not based on rational consideration, could
just as well have been decided by a coin flip), then this is a denial
of arbitrariness 8-)

> Whether the way it's currently done is a good idea is another
question;

'Good' on some absolute scale, or as compared to your underspecified
alternative?

> it seems from the constant confusion that this issue causes, it
doesn't
> seem so to me:  It causes confusion for newbies,

We agree that confusion is not good.  Whether any particular
(hypothetical) alternative would be (would have been) better or worse
in this respect is a different question.  I see three possible
responses to the current situation:

1. Let the confusion continue, with or without occasional bitching.

(2. Change the language, but this is off the table.)

3. Improve the presentation of what is so it is somehow less
confusing.

Here is why I am bothering to discuss and dispute your claim.
Presenting something as capricious or despotic is unlikely to disperse
confusion.  Explaining why is it as it is and some of the problems of
doing it differently might.

Terry J. Reedy





More information about the Python-list mailing list