[E-Lang] static typing

zooko@zooko.com zooko@zooko.com
Mon, 18 Jun 2001 21:08:03 -0700


I think Darius's nits are well picked.  (Contradicting MarkM's description of
static typing as being merely early detection of what would have been anyway a
fail-stop exception).

I think MarkM's over-all strategy with regard to static typing is an excellent
one, however: try not to preclude future innovation and otherwise leave it
alone for now.

I think this is the right thing for E to do for several reasons:

1.  Tactical considerations.  We don't really have heavyweight static typing
expertise on board AFAIK (at least MarkM claims to be mostly unfamiliar with
the field and I myself, though I have studied static typing a little, would not
want to try to apply my knowledge to such a complex engineering task as E), and
we are in a hurry.

2.  Dynamic typing is "good enough".  See Python, Smalltalk, Ruby, Lisp, etc.

3.  Static typing is not mature.  IMHO, static typing theory is still grappling
with how to admit some common and valuable compositions of abstraction without
losing hold of almost all of the benefits of static typing.  Many (but not all)
of the famous "Design Patterns" by e.g. Gamma et al. appear to be little more
than work-arounds for programmers in statically typed languages who want to do
something that the type system dislikes.

A recent paper that appears to move the state of the art forward is "Unifying
Genericity[1].  Citeseer says that it has four citations.

4.  We should be able to avoid precluding future static type systems.  In fact,
if a proposed static type system *cannot* be applied to E in a
backwards-compatible way, then this suggests that the system forbids things
that E chose to allow, and hence the type system constrains expressiveness,
which means it isn't good enough anyway.


Regards,

Zooko

[1] "Unifying Genericity: Combining the Benefits of Virtual Types
     and Parameterized Classes" 1999 Kresten Krab Thorup, Mads Torgersen
     http://citeseer.nj.nec.com/thorup99unifying.html