On Oct 27, 2011, at 4:40 AM, Axel Rauschmayer wrote:

>>> +1. Where the spec is already almost pseudo-code, its readability would 
>>> improve if it was, in fact, pseudo-code. But would an extra interpreter be 
>>> needed or couldn’t one just implement the ES-262 constructs (execution 
>>> contexts etc.) in an existing language (Python, Rust, Scheme, Smalltalk, 
>>> etc.)?
>> Why choosing a completely different language? Why not ECMAScript 5.1?
> 
> Right, I had forgotten about ECMAScript itself.

I would do it in ES5, or not at all.  There is absolutely no need for any other 
language.  Always eat your own dogfood!


> 
>> It will be one less language to learn as people who read the ES6 spec are 
>> very likely to be familiar with ES5.1. I personnally wouldn't feel 
>> comfortable reading a spec in any of the 4 languages you cited.
>> Or maybe define the couple of things that can't be fully implemented in 
>> ES5.1 (proxies, private names) and use ES5.1 + these construct to define ES6.
> 
> 
> I don’t think you need these constructs at the meta-level to implement them 
> at the object level. However, I would in general be in favor of ES6, because 
> it would help with implementing types (at the very least, subtyping would be 
> easier via <| ).

There would be no issues here.  We aren't talking about a metacircular 
interpreter, but a direct line-by-line translation of the spec. algorithms.  An 
ES6 objects would not  be directly represented by a single ES5 object but 
instead by a ES5 based data structure that implemented the object semantics 
specified by ES6.  ES5 is Turning-compete.  Anything the spec. describes can be 
implemented in it. 


Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to