Why static typed languages are sometimes better.
Ian Sparks
Ian.Sparks at etrials.com
Thu Jul 1 17:57:12 EDT 2004
> I agree. I appreciate the dynamic and polymorphic power of
> Python. On the
> other hand I hope it does a better job to catch my silly
> mistakes and
> typos. If only there is something like a lint it would save
> me something
> fixing runtime errors.
Pychecker:
http://pychecker.sourceforge.net/
> -----Original Message-----
> From: Wai Yip Tung [mailto:tungwaiyip at yahoo.com]
> Sent: Thursday, July 01, 2004 5:54 PM
> To: python-list at python.org
> Subject: Re: Why static typed languages are sometimes better.
>
>
> I agree. I appreciate the dynamic and polymorphic power of
> Python. On the
> other hand I hope it does a better job to catch my silly
> mistakes and
> typos. If only there is something like a lint it would save
> me something
> fixing runtime errors.
>
> Wai Yip Tung
>
> On Thu, 01 Jul 2004 17:43:56 -0400, Roy Smith <roy at panix.com> wrote:
>
> > I just had an interesting little surprise. I've got a
> method that takes
> > a string as an argument. I wanted to change it to take
> either a string
> > or a tuple of strings, so I did my usual "test first" thing.
> >
> > I changed the unit test I already had from calling it with
> a string to
> > calling it with tuple of two strings. I then ran the test,
> expecting it
> > to fail. The next step would be to go write the code to
> make the test
> > pass.
> >
> > Amazingly, the test passed (that means I'm done, right?).
> Well, it took
> > me a moment to realize that the only thing I ever do with
> the argument
> > in the current version is use it as a dictionary key.
> Since a tuple of
> > two strings is a valid key, so the test passed just fine.
> Sometimes the
> > language is just too forgiving :-)
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list