Python vs. C#

Andrew Bennetts andrew-pythonlist at puzzling.org
Wed Aug 13 02:45:02 CEST 2003


On Tue, Aug 12, 2003 at 11:56:07AM -0700, Brandon J. Van Every wrote:
> Andrew Bennetts wrote:
> > On Tue, Aug 12, 2003 at 02:03:58AM -0700, Brandon J. Van Every wrote:
> >>
> >> And how, in a large scale industrial systems context, are you
> >> supposed to ensure that Joe Programmer doesn't in fact screw it up?
> >
> > By writing tests.
> 
> Compiler checking is a kind of test that is done for you all the time,
> without you having to reimplement it over and over again.  I agree that
> people should write tests, but having written many, many of those for my own
> project, it is equally true that writing test cases slows down development.
> Anything that provides testing "for free" is a boon.

Static type checking, as implemented in C++, C# and Java, is laughably
minimal, seeing as it doesn't verify *logic* at all.  Show me a compiler
than can say "your binary search has an off-by-one bug in it" as part of the
compilation process.  Considering how much static typing hinders the
development process, I'd hardly consider that tradeoff to be "for free".

And I'll emphasis *again*, seeing as you snipped it, that Python is much
easier to write tests in, which speeds up development.  You admit that you
still need tests in a statically typed language... so what exactly is your
compiler checking doing for you?  Minimal correctness checking for something
you're testing anyway?

> > Besides, if you don't trust the "Joe Programmer"s of your team to
> > write code competently, I suspect your project is doomed already.
> 
> Big projects are filled with the bell curve.  Not to mention stress under
> deadlines, which ruins the code of even good programmers.

I doubt that trivial typos are the worst bug a stressed programmer would
introduce.

-Andrew.






More information about the Python-list mailing list