David Hopwood wrote: > Rob Thorpe wrote: > > Matthias Blume wrote: > >>"Rob Thorpe" <[EMAIL PROTECTED]> writes: > >> > >>>I think we're discussing this at cross-purposes. In a language like C > >>>or another statically typed language there is no information passed > >>>with values indicating their type. > >> > >>You seem to be confusing "does not have a type" with "no type > >>information is passed at runtime". > >> > >>>Have a look in a C compiler if you don't believe me. > >> > >>Believe me, I have. > > > > In a C compiler the compiler has no idea what the values are in the program. > > It knows only their type in that it knows the type of the variable they > > are contained within. > > Would you agree with that? > > No. In any language, it may be possible to statically infer that the > value of an expression will belong to a set of values smaller than that > allowed by the expression's type in that language's type system. For > example, all constants have a known value, but most constants have a > type which allows more than one value. > > (This is an essential point, not just nitpicking.)
Yes, I agree. That does not apply in general though. In general the value of the variable could be, for example, read from a file, in which case the compiler may know it's type, but not any more. I was talking about the general case. -- http://mail.python.org/mailman/listinfo/python-list