I come not to bury C++, but to praise it...

Derek none at none.com
Wed Jan 14 15:42:52 CET 2004


"Rainer Deyke" wrote:
> > You also seem to have a narrow view of C++ as a
> > strictly OO language when in fact it supports several
> > programming paradigms (write whatever you want: template
> > metaprograms, modules, procedures, classes, etc.).
>
> C++ is rather similar to Python in this respect. ;-)
>
> I currently have two languages that I regularily use: C++
> and Python.  C++ produces faster programs, gives direct
> access to the hardware, and has many third-party libraries
> that Python doesn't have.  Python is more concise, more
> flexible, safer, and has its own set of libraries that C++
> doesn't have.  Both have their place.  None of the other
> languages I've looked at (with the possible exception of
> Common Lisp) seem to offer me anything that I can't find in
> either Python or C++, and many of them (Java in particular)
> are far too restrictive for my taste.

I also use C++ and Python as my main languages and I agree with your
comments.  However, I don't agree that Python is inherently "safer"
than C++.  At best I see it as a tie.  For example, C++ let's you
corrupt memory among other "unsafe" things, most of which can be
avoided by using standard containers, smart pointers, etc.  Python
lets you do "unsafe" things such as passing an object to a function
when it makes no sense to do so, which can lead to nasty runtime
surprises.





More information about the Python-list mailing list