status of Programming by Contract (PEP 316)?

Michele Simionato michele.simionato at gmail.com
Fri Aug 31 01:26:20 EDT 2007


On Aug 31, 3:18 am, Russ <uymqlp... at sneakemail.com> wrote:
> For the record, the guy I
> criticized
> made ridiculous assertions about DBC.

And that would be me? Oh my! LOL!
This is not nearly as fun as the guy who explained to Steve Holden how
Python works, but still ... ;)

> If you are upset about my criticism of one of your colleagues, please
> tell him to quite making
> outrageous assertions about something he obviously knows little about.

For the record I read the design by contract book by Meyer
years ago (the first edition) and I could not stomach it.
The paper you mentioned is even worse. Programmers asserting
that a given metodology can give 100% reliable software
are incompetents or liars or both. Period.

Of course there are methodologies which are better than
others (for instance automatic tests are better than
manual tests) and one should try various approaches on
the field.

However, IMNSHO, nowadays design by contract has been superseded
by unit tests and it makes little sense to use it. Once
you have automatic tests and once you make liberal use of
assert statements in your code, you should not feel the need
for more than that. You may think differently of course,
but you should know that I am a ferocious opponent of
heavyweight approaches, huge frameworks, and all that.
Most people in the Python community are. This is why I
think dBC will never enter in the core, and it would be
extremely little used even as a third party library
(BTW, it has already happened).

        Michele Simionato




More information about the Python-list mailing list