W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

Re: Type restriction of elements in Array

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Mon, 17 Oct 2011 17:20:49 -0700
Message-ID: <CABZUbM16B2iUmzmk6b3yBcVjZ_p5U_WP9ow-DQBt17j_+ipS8A@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-script-coord@w3.org
On 10/17/11, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/17/11 7:29 AM, Alex Russell wrote:
>> Speaking only for myself (although I am a member of TC39), as JS doesn't
>> allow this sort of restriction
> But WebIDL sure does.
>> (without proxies, anyway)
> No need for proxies.  Any property with a setter can enforce whatever
> restrictions it wants on the arguments passed to that setter.
ACK. Including `length`.

> But since we're talking about "host" objects, why are we excluding
> proxies, anyway, exactly?
Careful. The TG39 committee don't collectively know what a host object is.

Depending who you ask, a host object is either A) an object supplied
by the host environment or B) a non-native object (kindly RTFM). The
host environment can supply a native object and that native object can
implement native semantics making it a native host object. That native
object may _also_ implement syntax extensions and still be a native
host object. Only when that object fails to implement native semantics
does it become a non-native host object.
Received on Tuesday, 18 October 2011 00:21:23 UTC

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