Static typing (was Re: Java guy interested in Python)

Michael Hudson mwh21 at
Sun Mar 11 22:17:56 CET 2001

"Alex Martelli" <aleaxit at> writes:

> "Tim Peters" < at> wrote in message
> news:mailman.984334635.27345.python-list at
> > [Rainer Deyke]
> > > When I type 'int i;' in C++, what I really mean is "'i' behaves like an
> > > integer variable.".
> >
> > Since that's all "int i;" *can* mean in C++, seems tautological <wink>.
> Surely you're joking, Mister Peters?
>     class int {
>         public:
>             int(const char*=0);
>             ~int();
>             const char* data() const;
>     };
>     int i;
> Isn't this perfectly legal C++


> , meaning something very different from "i behaves like an integer
> variable"...?  int is no "reserved word", after all.

Yes it is.  "identifier" and "keyword" are disjoint classes of token
in C++, at least by my reading of the 1997-12 working draft I've just
dredged up with google.

Unless I've missed some subtle joke...


  About the use of language: it is impossible to sharpen a 
  pencil with a blunt axe. It is equally vain to try to do 
  it with ten blunt axes instead.
      -- E.W.Dijkstra, 18th June 1975. Perl did not exist at the time.

More information about the Python-list mailing list