W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: Writing spec algorithms in ES6?

From: Rick Waldron <waldron.rick@gmail.com>
Date: Thu, 11 Jun 2015 21:16:41 +0000
Message-ID: <CAHfnhfopaMSAQwJEmcx27GMzqVpm5jjGRWC8XtRGXqV8BRfumQ@mail.gmail.com>
To: Domenic Denicola <d@domenic.me>, Dimitri Glazkov <dglazkov@google.com>, public-webapps <public-webapps@w3.org>
On Thu, Jun 11, 2015 at 4:53 PM Domenic Denicola <d@domenic.me> wrote:

> Some previous discussion: [1] especiallly [2]
>
> In general I think this is a reasonable thing, but it requires a decent
> bit more infrastructure to do things “safely”. For example, consider the
> definition [3]. It's generic in its arguments, which I think is nice (but
> does not fit with Web IDL---whatever). However, it's susceptible to author
> code overriding Array.prototype.join. Similarly, [4] relies upon the
> author-modifiable Math.max and Math.min, not to mention the
> author-modifiable Math binding.
>

Yep. The correct way to use these is to normatively reference the
Well-Known Intrinsic Objects Table[0] in ES2015, and cite any "extensions".
This is how Ecma 402 and the new SIMD spec ensure object integrity when
referring to built-ins.

Rick



[0]
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-well-known-intrinsic-objects
Received on Thursday, 11 June 2015 21:17:20 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC