Is Python overhyped (just like Java)?

François Pinard pinard at iro.umontreal.ca
Sat Mar 29 23:48:31 CET 2003


[Ajay na]

> Can some-one please explain why one would want to use Python?  What is
> wrong with C++?  [...]  I want someone to give a solid and intelligent
> argument about why I should switch from C++ to Python!

It is unlikely that people say that you _should_ switch.  This is your
decision to make, according to your own needs and criteria.  People can only
say why they themselves chose to switch, when they did so.

For one, I would want to use Python over C++ mainly because I can write and
debug Python much faster than I would do in C++, and because I have more
pleasure from the overall legibility of the resulting code, giving me the
feeling that later maintenance is likely to be pleasurable.

The strong typing of C++ is surely a good side of the language, seen as a
helping device for programmers, but speaking for myself, it is not enough of
an incentive for switching, at least for most programs I write.

> Those who use Python know they are sacrificing a lot in terms of memory
> and speed.  But if they took the same attitude toward C++, they can
> actually get a lot of flexibility, code reuse, simplicity, and all the
> other benefits of OO programming at over half the cost of using Python!

Memory is cheap, and computers are fast.  I am expensive and slow :-).  So,
the sacrifice you refer to does not hurt much, in practice, and Python is
often the right solution.  Moreover, whenever I'm really starving for speed,
or memory, there are good Python-friendly solutions.

> The problem is that people who don't understand C++, are afraid to use the
> 'virtual' features of that language because it's 'too expensive'.  But
> that's stupid...because Python's 'virtualness' is even more expensive!

The problem here is likely to properly consider and evaluate all the costs.
You might discover that Python is surprisingly, radically economical.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list