On Thu, Aug 30, 2018 at 3:44 AM Marko Ristin-Kaufmann <
marko.ris...@gmail.com> wrote:

> Related to the text I emphasized, would you mind to explain a bit more
> in-depth which features you have in mind? I see contracts formally written
> out and automatically verified as a completely indispensable tool in large
> projects with multiple people involved.
>

This much is rather self-evidently untrue.  There are hundreds or thousands
of large projects involving multiple people, written in Python, that have
succeeded without using contracts.  That suggests the feature is not
"completely indispensable" since it was dispensed with in the vast majority
of large projects.

I think that most of these large projects succeed in large part because
they have good *unit tests*.  There are several popular frameworks for
writing these (some in standard library), but notably none of them require
specific syntax changes to make them work.  Some of them *do* use DSLs of
sorts as part of how they operate (or various metaprogramming and
introspection magic).  There is a whole lot of overlap between what unit
tests do and what design-by-contract does, enough so that I believe the
latter adds little to a large project (of course you can come up with some
specific example that a unit test cannot verify as well as a
pre/postcondition.

In writing before about "features" (and Paul Moore) does a better job than
me in writing about *costs*, I wasn't discussing design-by-contract
specifically.  Various new feature ideas come up here and elsewhere.  A few
are accepted, most are rejected.  They all need to be compared to costs
like those I mention before their possible advantages can win out.

Yours, David...

-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to