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

Re: Writing spec algorithms in ES6?

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Thu, 11 Jun 2015 16:41:55 -0400
Message-ID: <5579F293.2030201@mit.edu>
To: public-webapps@w3.org
On 6/11/15 4:32 PM, Dimitri Glazkov wrote:
> I noticed that the CSS Color Module Level 4 actually does this, and it
> seems pretty nice:
> http://dev.w3.org/csswg/css-color/#dom-rgbcolor-rgbcolorcolor

I should note that the ES code there produces semantics that don't match 
the IDL in this spec (or is complete nonsense, depending on how 
literally you choose to read it).

So there are basically at least two problems here:

1)  You have to clearly delineate when you're working with JS values and 
when you're working with IDL values, to the extent that these are not 
the same thing.

2)  You have to clearly delineate which bits of JS run in the page 
global and which bits run in some other clean global and which bits run 
in the page global but have access to some clean intrinsics somehow.

I would actually prefer some sort of pseudocode that is _not_ 
JS-looking, just so people don't accidentally screw this up.

-Boris
Received on Thursday, 11 June 2015 20:42:25 UTC

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