Python Productivity over C++

Ken Seehof kens at sightreader.com
Thu Jun 15 13:38:28 EDT 2000



"Frank V. Castellucci" wrote:

> Courageous wrote:
> >
> >
> > > As someone who uses and likes both C++ and Python, I think estimates
> > > like that are excessively simplistic.
> >
> > Me, too. And yet I will claim that I've become *more* productive
> > in Python after a brief 4-6 weeks of use than I am in C++ after
> > 15 years of use, and that's no exaggeration. If Python executed
> > as fast as other languages, I'd be tempted to *require* that our
> > staff use it. And please don't take this wrong; I'm no language
> > groupie -- I use C, C++, Java, Python, and Lisp -- all of them both
> > lately and frequently.
> >
> > > I use C++ for commercial programming, because it gives me the power and
> > > control I need.  Productivity isn't the best when measured in time to
> > > get the first prototype running, but I've found nothing better when
> > > measured in time to develop, deploy, maintain and support something a
> > > customer will pay for.
> >
> > Shrug. If it weren't for execution speed, your C++ environment would
> > be toast. Admit it. :)-
>
> While the last line seems rather toungue in cheek, there are other
> things that C++ brings to the table such as encapsulation, access
> control and type strictness.

All three of these items were intentially left out of python because python
would not benefit from them, though C++ does.

"Frank V. Castellucci" might have written (but actually didn't):
> A fish has certain definite advantages over a duck.  For example a fish has
gills.

A duck floats, so it doesn't need gills.  Fish need gills because they can't
float.  Besides, gills would look really ugly on a duck.

Encapsulation, access control and type strictness are often erroneously
referred to as if they were features.  They aren't.  They are aspects of a
design philosophy.  To make a system less error prone, constrain the programmer
in order to prevent the programmer from writing bugs.  Of course, that's
impossible, since it is always possible to write bugs anyway.  Because C/C++
are extremely error-prone languages, they need stuff like encapsulation,
access, control and type strictness.  Because python is less error prone, it
doesn't need these "features".  Python is based on different philosophy: To
make a system less error prone, make it simple.

You have to ask, "what is the actual value of these features?"  The answer is
that they prevent certain kinds of bugs from appearing.  Now ask, "what bugs
would a C++ programmer encounter if encapsulation, access, control and type
strictness were removed from C++."  Undoubtedly it would be a mess.  Get a
picture in your mind of these bugs.  Now ask a python programmer how often
these kinds of bugs come up.  Answer: "can't remember that ever happenning!"

Look at the big picture.  Do encapsulation, access control and type strictness
really make C++ really less error prone than python?

I think not.

> --
> Frank V. Castellucci

--
Ken Seehof
kens at sightreader.com
starship.python.net/crew/seehof
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kens.vcf
Type: text/x-vcard
Size: 343 bytes
Desc: Card for Ken Seehof
URL: <http://mail.python.org/pipermail/python-list/attachments/20000615/a8101ad2/attachment.vcf>


More information about the Python-list mailing list