Robert Feldt <feldt / ce.chalmers.se> writes:

> ...relevant to Ruby compared to other languages discussion:
>
> http://www.chimu.com/publications/short/whyDynamicTyping.html

I'm often surprised that ML (and languages like Ocaml) aren't brought
up more in these discussions.  People seem to hold up Java and C++ as
the only examples of statically typed languages.

But this post describes the same kinds of benefits in Ocaml, a very
strongly typed language.

    http://caml.inria.fr/archives/200106/msg00181.html

I've long been meaning to explore Ocaml to see if static type
inference/unification + polymorphism really does lead to the same
kinds of benefits as dynamic type checking.

For example, a common thread on ruby-talk is how to best verify that a
particular object implements a given interface.  In languages like
Ocaml, this is not an issue.  Programs simply fail to compile if the
interface is not satisfied (type inference/unification) but all
functions are still polymorphic -- i.e. their parameters can be of any
type so long as those types implement the correct interface.

With this in mind, the arguments in whyDynamicTyping.html about static
typing leading to stiff, rigid code seems to be refuted.  I'd love to
play around with these issues to see for myself.


-- 
matt