SV: Python Productivity over C++

David Bolen db3l at fitlinxx.com
Tue Jun 13 15:06:31 EDT 2000


Thomas Thiele <thiele at muc.das-werk.de> writes:

> >
> > Yup.  And that's precisely why Python looks better and better as your
> > programs get larger.  Python allows you to concentrate on your problem
> > rather than the language.  Python literally allows you to develop the
> > code for your algorithm in realtime, rather than designing your
> > algorithm and *then* writing the code to match your algorithm.
> >
> 
> The only difference I see between developing algorythms in C++ and
> Python is that python needs no time for compiling. But the advantage
> of C++ is that I get the most error messages during compilation (->
> earlier!)

This does raise an interesting question.  Of the total set of errors
(which "most" you receive during compilation), how many of them are
related to syntactic or language overhead versus algorithmic issues.

It seems to me that the former does not necessarily represent a
benefit to C++ over Python, because in my experience C++ has more
syntactic "sugar" that can increase errors in that respect, so the
fact that you get more of them during compilation isn't something that
translates over to Python anyway.

Some amount of such errors (say errors in type declarations or other
issues related to the strong, static typing of C++) can certainly
point to algorithm issues during compilation.  But again, many of
those issues arise from the requirement of strong typing an algorithm
in the first place, so need to be considered as errors whose existence
are largely a by-product of the development environment in use.

But true, there's the area of name errors during runtime, which my
first inclination was to consider a real problem with Python.  Even
with some of the 'lint'-like tools around, it didn't seem to be
considered a major problem by the community.  But the more code I
write the less concerned I become as I find that surprisingly it just
isn't showing up as a major problem, and it's easy enough to program
defensively against anyway.

But the latter (algorithm issues) are, I believe, just as likely to
show up in runtime in C++ as they are in Python.  And at that point,
Python makes it much easier to iterate, debug and maintain those
algorithms and designs.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list