On Sun, 2009-01-04 at 12:58 +0300, Sergey Popov wrote:

> На Fri, 2 Jan 2009 12:34:16 -0500
> "Eric S. Raymond" <[email protected]> wrote:
> 
> > I have 26 years of experience as a C programmer.  Before that I wrote
> > a lot of LISP, which had the same absence of type safety as Python and
> > similar capability for introspection.  There are sometimes good
> > reasons to code in C but due to my prior LISP experience I have never
> > considered "type safety" to be among them -- it's a bad substitute for
> > being explicit about your invariants and data semantics, what Eiffel
> > fans call "programming by contract".
> Python doesn't have built-in support for programming by contract AFAIK.
> Even if it would, I don't think that people here would bother with
> learning and actually using it.
> Personally, I think that being explicit about your invariants is poor
>  substitute for type safety :) Type safety is a lot better than design
>  by contract and unit testing, since it doesn't require additional effort
> and code to add checks once types are established. This is less code
>  to maintain, consequently less bugs.


I strongly urge all would-be python contributors to install and use
utilities such as pylint and pychecker. Both do a wonderful job of
identifying common coding errors hidden or made obscure by the lack of
static typing. These tools do not completely address the problem but
they do cover a lot of potential pitfalls which can otherwise only be
caught at runtime.

http://pychecker.sourceforge.net/
http://www.logilab.org/857

-- 
Greg Copeland <[email protected]>
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to