Python vs. C#

Brian Quinlan brian at sweetapp.com
Wed Aug 13 02:24:23 EDT 2003


> > I think that depends on how efficient you are at writing tests. 
> > Python offers a great testing framework to help you.
> 
> No, writing tests consumes time.

Of course. The question is whether writing tests results in less net
development time (due to more rapid bug discovery and elimination). My
experience is that it usually does.

> C++ style compiler checking helps.

You are changing the subject of discussion; we were talking about C#
(and Python; see the subject of this thread). C++ has templates and STL
uses them to provide type-safe containers and algorithms. .NET languages
are not required to support templates (VB doesn't and neither did the
first release of C#) so the class libraries are not type safe. Having
written tens of thousands of lines of C# code I can tell you that the
compiler seldom saves me from making a type error.

> I've never met anyone who thinks
> otherwise.  Pythonistas just habitually claim it doesn't have merit
and
> complain about burdens imposed.  To us C++ guys, it is no big deal. 

That is because C++ programmers naturally use C++ design patterns to
code in C++. Those design patterns preclude the use of any features not
found in the language. If, on the other hand, you were accustomed to a
different language, you would probably notice the "big deal" when your
favorite design patterns are rendered impossible by static typing.

BTW, notice that you are arguing for the inclusion of static typing,
which catches only a small fraction of bugs and greatly reduces design
flexibility and against type checking, which imposes no design
restrictions and can catch more classes of bugs.

Cheers,
Brian






More information about the Python-list mailing list