Python is just as good as C++ for real apps
aleax at aleax.it
Fri Jan 25 05:49:57 EST 2002
"Greg Weeks" <weeks at vitus.scs.agilent.com> wrote in message
news:1011928798.593378 at cswreg.cos.agilent.com...
> Anyway, complex numbers and geometric points and such can be represented
> by pointer-to-structure types. The programmer can prevent the objects
> being mutated after they are created and can define equality to be the
> equality of parts. Java and Python allow only this. C++ provides more.
> If Stroustrup believes that this additional expressiveness is worth the
> added complexity, I'm disappointed.
The motivation is performance (time and space) rather than just
"additional expressiveness". A point with two 16-bit coordinates
can fit in a single 32-bit register and can be used very speedily;
forcing it to be accessed via a pointer would double the memory
cost on typical machines and slow things down substantially.
Potential for extremely high performance has always been very high
among C++'s design objectives, even to the detriment of simplicity,
generality, and other nice concerns.
More information about the Python-list