Re: what ML language do you recommend?



Paul Rubin <http://phr.cx@xxxxxxxxxxxxxx> writes:
>Why does concurrency or run-time code change need dynamic types? I
>don't see why concurrency needs it at all.

You want to be able to send and receive large data structures to other
processes without specifying serialization, both for simplicity and because
you want the transmission to be just a pointer copy operation if the two
processes are on the same machine and both have access to the memory.
Doing this when you don't know whether the other process has the same
idea of the type of the data being sent (since it may be using an earlier
or later version of the protocol) requires dynamic types.

With the Erlang approach, communication is still possible between processes
that have different ideas of the type of the data being sent. Of course,
the data may actually contains parts that the receiver doesn't understand.
I expect that in many domains, this should not happen often: data type
extensions tend to be for new features, and features are probably not used
frequently when they are new. If it does happen, an Erlang program is
expected to recover from it the same way it recovers from a hardware fault.

There are probably ways to get similar convenience in a statically typed
language, but I don't know of any fully worked out proposal. Most people
who started looking into this found it to be quite a hard problem. And I
speak as an advocate of static type systems.

Ulf: thanks for the reference to Dialyzer, I will read the papers on it
tonight. When did you guys start using it?

Zoltan Somogyi <zs@xxxxxxxxxxx> http://www.cs.mu.oz.au/~zs/
Department of Computer Science and Software Engineering, Univ. of Melbourne
.



Relevant Pages

  • Re: what ML language do you recommend?
    ... than two versions of the software running simultaneously? ... > extensions tend to be for new features, and features are probably not used ... If it does happen, an Erlang program is ... > expected to recover from it the same way it recovers from a hardware fault. ...
    (comp.lang.functional)
  • Re: what ML language do you recommend?
    ... >different versions of the sending object. ... >> extensions tend to be for new features, and features are probably not used ... If it does happen, an Erlang program is ... >> expected to recover from it the same way it recovers from a hardware fault. ...
    (comp.lang.functional)
  • Re: Cant open file
    ... features to try and recover whatever's left of the original document in ... session is finished and saved, ...
    (microsoft.public.windowsxp.help_and_support)