SML vs Ocaml for ECMA script spec.
dherman at ccs.neu.edu
Tue Oct 24 17:33:16 PDT 2006
> One can implement this signature using continuations, but it is also
> easily implementable using MLton.Thread. The point being that you can
> give a simple semantics to the meta-language extended with structure
> Thread: THREAD, and then implement structure Thread using whatever
> lower-level mechanism the particular SML implementation provides. And
> readers of the ES4 spec don't have to understand the low-level stuff.
It's an interesting idea, that we could pretend to be building on top of
a native cooperative-threading semantics, which is actually implemented
in terms of callcc. (I think it's what you were trying to say in your
first email but I didn't pick up on it.) So casual readers have one
level of abstraction they can use to think about it, and semanticists
can see the lower level definition.
OTOH, I'm not sure the extra level of abstraction is necessary.
>> Certainly a pre-emptive threading system would make the sequentiality
> I'm not sure what your point is here.
Just basically the same thing you said: using a concurrent meta-language
complicates the underlying semantics.
> Going with SML/NJ is a fine choice. It's often what I use. I am
> simply saying that you should also compile with another compiler
> regularly, and from the start. It's not that hard. And if you don't,
> you will shoot yourself in the foot, and not find out until much
> later, after you have lost a lot of blood.
Good advice, thanks. I'll give MLton a try.
More information about the Es4-discuss