Re: Web IDL maplike: Allow spec prose to specify how key-type should be compared?

On Mar 9, 2015, at 12:05 PM, Jonas Sicking wrote:

> Another example of when this problem shows up is in the design of the
> Stream class. The two "ends" of a stream should really be two separate
> objects with a specified interface. Those two objects should always
> work in concert to make up the stream object. However JS doesn't allow
> creation of those two objects without requiring that each object also
> can be instantiated and useful on its own.
> 
> The closest thing to "interface" that JS has is "duck type".

Proxy.revoable  http://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy.revocable is an ES6 API that creates two "linked" objects.

Allen

Received on Monday, 9 March 2015 19:53:35 UTC