W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

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

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Mon, 9 Mar 2015 12:53:01 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "Mark S. Miller" <erights@google.com>, David Dorwin <ddorwin@google.com>, public-script-coord <public-script-coord@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
Message-Id: <DAC09035-60AA-4B45-A645-116638284ADA@wirfs-brock.com>
To: Jonas Sicking <jonas@sicking.cc>

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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC