+1: * existing test case IDs for all 10K+ tests on test262 would need to updated. This alone makes me very hesitant to suggest any modifications to the *existing* pseudo-code algorithms * an implementer's dilemma here is that in many cases a developer implementing Harmony feature 'Xyz' is not going to be well-versed in *all* areas of ES5.1
That said, there's definitely value in spec'ing Harmony's *new* methods (e.g., 'String.prototype.startsWith') in ES5.1 from a test perspective. I.e., I can write the tests, mock the ES6 additions to an existing ES5.1 implementation, and most importantly validate correctness of the tests themselves long before a native implementation of the ES6 feature has become available. It's a great enabler for more TDD. My best, Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andreas Rossberg Sent: Thursday, October 27, 2011 4:48 AM To: David Bruant Cc: es-discuss Subject: Re: testable specification On 27 October 2011 13:35, David Bruant <[email protected]> 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? > 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. To spec a beast like ES, you want something with a considerably simpler and cleaner semantics than ES. Otherwise, all you end up with is a circular definition. Ideally, a good executable spec would become the normative spec at some point, so this is not just a philosophical point. /Andreas _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

