Revision as of 16:51, 7 May 2012 by Benmachine
The article contains this:
- Weak typing: There are only few distinguished types and maybe type synonyms for several types. E.g. C uses integer numbers for booleans, integers, characters, bit sets and enumerations.
- Strong typing: Fine grained set of types like in Ada, Wirthian languages (Pascal, Modula-2), Eiffel
This is not my understanding of strong and weak typing at all. I would like to replace it with:
- Strong typing: Objects have types, and there are no implicit conversions (although overloading may be used to simulate them), so using an object in the wrong context is an error. In Python, indexing an array with a string or float throws a TypeError exception; in Haskell it will fail at compile time.
However I lack any real authority to back up this definition. Comments appreciated.