does lack of type declarations make Python unsafe?

Moshe Zadka m at moshez.org
Tue Jun 17 10:52:33 EDT 2003


On Tue, 17 Jun, Dave Brueck <dave at pythonapocrypha.com> wrote:

> Can you clarify what you mean by "source code is always a liability"?

Well, I can *try*. I don't have any research, merely anecdotal evidence.
The anecdotal evidence suggests that I *enjoy* deleting code. A public example
is how I helped the deletion of the "poly" module from Python (technically,
it's in lib-old for backward compatibility reasons, however) -- and I
consider it to be one of the best contributions I made to core Python.

Now, in what ways was the "poly" module a liability? Well, the core Python
team had to maintain it. They had to make sure its performance was decent
and that it had no bugs and that the interface is decent. They didn't.
In 1.5.2, this module carried ugly 1.2-work-aroundy baggage and did polynomial
multiplication in a silly way. It obscured from people that there are
*good* polynomial modules for Python (in Numeric, IIRC).

Now, having the *functionality* of polynomials is an asset. Having *source
code* for supporting polynomials was a liability -- it sucked the time
and energies of Python developers.

This is why "YAGNI" is such a powerful principle -- because source code
without functionality is sheer liability. This is why "do the simplest
thing" is powerful -- because less source code for the same functionality
is better. Neither of those would be true if source code was not a liability.
I'm not sure if you think this is the trivial sense -- if you think this
*is* trivial, you have some programming maturity, so good! :)

-- 
Moshe Zadka -- http://moshez.org/
Buffy: I don't like you hanging out with someone that... short.
Riley: Yeah, a lot of young people nowadays are experimenting with shortness.
Agile Programming Language -- http://www.python.org/





More information about the Python-list mailing list