Is python really slow?

David K. Trudgett dkt at registriesltd.com.au
Tue May 21 22:01:34 EDT 2002


On Wednesday 2002-05-22 at 11:39:41 +1000, Andrew McNamara wrote:

> >By the way, C is a "small" language and not hard to learn. It might be
> >hard to learn to program *well* in it, but that's another story. :-)
> 
> Well, not really - this is almost the central issue: C code goes wrong in
> subtle ways (eg, double-free() of a pointer, over-indexing an array),
> Python doesn't (usually). When it goes wrong, Python encourages interactive
> exploration of your code, whereas C, you have go into the time consuming
> "edit-compile-debug-iterate" phase.
> 
> If you're new to programming, a language like Python would seem to be the
> right place to start.

That's quite right. I didn't mean to give the impression that C is a
good language to cut one's teeth on. Far from it. However, it is a
small language, and therefore easy to learn. That doesn't mean that
it's easy to write good programs in it. C goes out of its way to give
the programmer all the power required to shoot himself* in the foot.
It assumes the programmer knows exactly what he is doing -- a bad
assumption most of the time ;-)

David Trudgett

*Which is not to imply that all programmers are male. Apart from being
normal usage in several languages to use the masculine in the generic
sense, the fact is that most programmers probably are male!







More information about the Python-list mailing list