SML vs Ocaml for ECMA script spec.

Dave Herman dherman at
Tue Oct 24 19:32:16 PDT 2006

> As for the style of the semantics. In an ideal world there would be a 
> high-level "natural" big-step semantics. This big-step semanitcs is best 
> for your "casual" progammer to undersand the spec. A very detaled 
> "small-steps" semantics would be useful and avoid the need for adding 
> things like threads/call-cc.

There's no reason a big-step operational semantics should be more 
readable than an ML evaluator. We were heading in the direction of a 
small-step semantics with explicit evaluation contexts, but decided that 
a direct-style interpreter would be a bit more abstract and more accessible.

> Such a small-steps semantics maybe out of the charter of the current 
> standard, but there is nothing preventing some energetic folks to 
> maintain a small-step semantics in parallel with the "offical" spec. If 

Yes, I've already prototyped a small-step semantics implemented in the 
term rewriting language Stratego. One of the interesting side effects of 
a small-step interpreter is that you get an automatic stepper 
(debugger), as opposed to just an evaluator.

> the small-step semantics is more unambigous, one might consider that the 
> "offical" spec and the big-step semantics the advisor commentary about 
> it, or vice versa. But that decsion can be sorted out at the end of the 
> day.

Well, no-- the working group has decided on ML as the spec language for 
very good reasons we've already gone into. We aren't going to develop 
two semantics in parallel on a tight deadline. :)


More information about the Es4-discuss mailing list