strong/weak typing and pointers

Steven Bethard steven.bethard at
Wed Nov 3 09:14:27 CET 2004

Mike Meyer <mwm <at>> writes:
> Finally, I don't see that there's that much difference between the two
> different definitions of 'weakly typed'.  Both can be described as
> treating an object as if it were of some type other than what it
> really is. In one case, you abuse the raw bits, and in the other you
> coerce the object to a different type.

One other thing:  If you lump coercions with weak-typing, you allow the code
written in a language to adjust the degree of "weakness" of a language.  Any
language (like Python) that allows you to override operators allows you to
create new coercions[1].  So if I don't like the strong/weak classification of
my language, I can always make it more "weakly-typed" by just adding more
nonstandard coercions.

IMHO, classification of a language as strongly- or weakly-typed should be
invariant of the code written in a language -- it should be something associated
with the language definition itself.  Lumping weak-typing with coercion makes
this impossible.



More information about the Python-list mailing list