« Going to North Carolina... | Main | Haskell and the Great Verb Drought of 1998 »

January 24, 2007


Isaac Gouy

"Programming Languages: Application and Interpretation"

I recommend this pdf book so often that one of these days I really must read it through :-)

Chapter 28, Type Soundness, quadrants languages on these distinctions
- type safe / type unsafe
- statically checked / not statically checked

Scheme is type safe / not statically checked - presumably so is Lisp - is that less "derogatory"?

The only high level language I've come across which would be well described by 'untyped' (or perhaps better typeless) is BCPL.


Don Stewart

Non-parametric polymorphism is usually now referred to as 'bounded parametric polymorphism' in the Haskell type class world , rather than as 'ad hoc' polymorphism. Perhaps that is better nomenclature?

So we have:

sort :: (Ord a) => [a] -> [a]

bounded (or ad hoc) polymorphic over types in Ord, and:

map :: (a -> b) -> [a] -> [b]

however, which is truly parametrically polymorphic.

Chris Rathman

If you want a good reading on the term ad-hoc polymorphism, I'd suggest going to the definitive source of Cardelli and Wegner:


The paper discusses Universal polymorphism (Parametric and Inclusion) and Ad Hoc polymorphism (Overloading and Coercion). This terminology has less to do with static vs. dynamic, and more to do with whether overloading is simply a syntactic dispatch to monomorphic functions.


We refer to strong/weak/untyped and static/dynamic differently. Python is strongly, dynamically typed. Perl and bash are untyped (all strings treated sometimes as numbers), c (compile time checking but converting among types too freely) is statically, weakly typed. I am not sure of how strongly ruby is typed, though it is clearly dynamic.

The comments to this entry are closed.