[Haskell-cafe] Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult.

Serguey Zefirov sergueyz at gmail.com
Sun Apr 4 04:39:17 EDT 2010


2010/4/4 Casey Hawthorne <caseyh at istar.ca>:
> Apparently, Erlang does not have a static type system, since with hot
> code loading, this is intrinsically difficult.

Apparently, this is doable with proper engineering even for such an
unsafe language as C: http://www.cs.umd.edu/projects/PL/dsu/

> "Erlang Programming", Francesco Cesarini & Simon Thompson, June 2009,
> O'Reilly, page 31.

I think this is opinion from the time of Erlang design and initial
prototypes which gets speaken repeatedly over and over again without
(re)checking of facts.

> If Haskell allows hot code loading, would this throw a wrench into the
> static type system?

The code that is loaded most often is the code of "state transformer"
that operate on completely specified types of state and incoming
messages. Behaviours (high level program composing "combinators" for
Erlang) are pretty stable (and, as far as I can tell, are hard to
reload - but I can be wrong).

Again, one example of code reloading implemented for Bluetail Mail
Robustifier actuall stops the system for complete code update and need
special conversion code to update old state to new state invariants
and back. I think that it is even easier in the presence of strong
type system.

And again: most of Erlang library code is annotated with type
specifications for dialyzer. So I don't think that contemporary Erlang
is dynamically typed. It's just static types does not used much. ;)


More information about the Haskell-Cafe mailing list