Class Variable Question

Alex Martelli aleaxit at yahoo.com
Sun Apr 15 12:55:40 EDT 2001


"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
news:slrn9diqh0.lut.qrczak at qrnik.zagroda...
    [snip]
> > Your C++ compiler doesn't catch all the typos you can make where you
> > type '+' while meaning to type '-', or '>' intending '<', etc, for
> > example.
>
> Of course. No language catches such typos.
>
> It doesn't imply that catching detectable typos (e.g. using names
> which are not defined) is worthless!

No, it just puts that worth in perspective.  It's worth _something_,
sure -- but not very much.

> I'm seeing again this poor argument: some mechanism doesn't solve
> all problems, so it's worse than having nothing...

If there was *NO* price to be paid for the 'mechanism', that would
be a poor argument indeed.  Since, in this case, there *would* be
a substantial price to pay to catch this specific subset of typos, it
becomes very important to put the gain in perspective, rather than
idolize this typo-catching as something precious and worth paying
a lot for just because some languages perform it.  As you note in
the snipped part, lint-like approaches, for example, can catch such
typos WITHOUT requiring alterations to the Python language.  Like
the previously separate function of tabnanny was eventually put in
the Python interpreter with the -t option, so can others (indeed, it
would not be hard to modify interpreter sources to give a general
escape mechanism for such checking).  Proposing to mutilate the
language's power instead of making tools better is inane.


Alex







More information about the Python-list mailing list