Three Kinds Of Typing

There are three ways languages deal with types.


While it's true that AssemblyLanguage doesn't "have types" in the sense that, say, C does, it does in fact have types -- just not "floats" or "enum" or other artificial constructs. Bytes and words and bits are very real types in AssemblyLanguage, and addresses (pointers) are a real thing. Further, flags (a kind of bit, grouped in a word) are a type. What AssemblyLanguage does not have is rules about higher level type abstractions. These can be crafted in AssemblyLanguage, and the result is called a "compiler" or an "interpreter."

ForthLanguage has types when it's convenient, and eschews them when it's not. Oddly, although ForthLanguage is "higher level" than AssemblyLanguage, its very abstraction can create an effective "typelessness" where data can be either "waves or particles" depending on the programmer's mood. When a ForthLanguage context requires it, a word can be written to enforce typing semantics, but more often the programmer is allowed to be as strict or as loose as he deems appropriate. Think "stick shift" and "rack-and-pinion" with a machine shop in the back seat to build "cruise control" when needed.

-- GarryHamilton


http://perl.plover.com/yak/typing/typing.html is a very good article about type systems. Most of the examples are in C, Pascal and ObjectiveCaml. It hardly mentions perl.

For another typing model, see TypingQuadrant.


The following URL explains all of this much better than I did. http://www.cs.cornell.edu/courses/cs412/2002sp/lectures/lec12.ps

The entire debate about typing seems to be deeply flawed because people are misusing terms like static/dynamic/weak/strong and also because the comparisons are always made between essentially flawed type systems like Pascal/C versus Smalltalk. I'd like to see some comparison of the type systems in OCaml/Haskell versus Smalltalk/Python/Ruby.--AdewaleOshineye


EditText of this page (last edited July 7, 2003) or FindPage with title or text search