Re: Optional Static Typing

From: Ville Vainio (ville_at_spammers.com)
Date: 12/28/04


Date: 28 Dec 2004 09:57:20 +0200


>>>>> "Ryan" == Ryan Paul <segphault@sbcglobal.net> writes:

    Ryan> I wrote a blog post this morning in which I briefly argue
    Ryan> using DbC and predicate based argument constraints instead
    Ryan> of static typing. Take a look

I took a look. The first impression is that there is too much stuff to
be added to the language, for a relatively unproven methodology (DbC).

Yes, observe the herecy in my argument; I'm indeed referring to DbC as
being an unproven way to write software. Eiffel never really made it,
and explicit preconditions/postconditions haven't really appeared in
other languages either. I'm not sure I'd like to see Python (which is
not an academic language) take the risk of bloating the language
definition with it. Let Ruby, or Boo, or whatever have a go before
Python. And yes, I've read my OOSC, and my code has its share of
asserts.

Type declarations, on the other hand, are as mainstream as one can
get. Being optional, they would not brutally murder the spirit of all
the good that is Python, contrary to the doom and gloom people have
been painting here and elsewhere. The implementation of CPython would
become more complex, but I trust the people that are implementing it
enough to not be overly concerned.

-- 
Ville Vainio   http://tinyurl.com/2prnb


Relevant Pages

  • Re: Python or Java or maybe PHP?
    ... >practicing what's called "Design by Contract" (DbC). ... With language support, you only code ... Python ("Design By Contract for Python", PyDBC, Contracts ...
    (comp.lang.python)
  • Re: design by contract versus doctest
    ... Colin Blackburn wrote: ... > In this case yes because python does not support DbC within itself. ... > Software Construction, ed 2, by Bertrand Mayer. ...
    (comp.lang.python)
  • Re: from Dannys chat - 11/19
    ... >> Design by contract results in a nice clean syntax when it is built into ... >> the language, but it isn't anything you can not implement using asserts. ... > One of the benefits of DBC is that unit testing can be automated better. ... > automated tool that uses this information to generate test cases. ...
    (borland.public.delphi.non-technical)
  • Re: How about "pure virtual methods"?
    ... >> doesn't do what the contract claims it does. ... If you want to experiment with DbC within Python, ... quite separately from the issue of changing programming languages. ...
    (comp.lang.python)
  • Re: from Dannys chat - 11/19
    ... > Design by contract results in a nice clean syntax when it is built into the ... > language, but it isn't anything you can not implement using asserts. ... One of the benefits of DBC is that unit testing can be automated better. ... automated tool that uses this information to generate test cases. ...
    (borland.public.delphi.non-technical)