Python from Wise Guy's Viewpoint
Fergus Henderson
fjh at cs.mu.oz.au
Wed Oct 29 04:45:42 EST 2003
Pascal Costanza <costanza at web.de> writes:
>Can you show me an example of a program that does't make sense anymore
>when you strip off the static type information?
Here's a C++ example:
x << y
Depending on the types of x and y, this might mean left shift, I/O,
or something entirely different.
Here's another C++ example:
#include "foo.h"
main() {
auto Foo x; // constructor has side-effects
}
If you strip away the static type information here, i.e. change "auto Foo x;"
to just "auto x;", then there's no way to know which constructor to call!
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
More information about the Python-list
mailing list