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

Re: Type restriction of elements in Array

From: Erik Arvidsson <arv@chromium.org>
Date: Mon, 17 Oct 2011 10:50:47 -0700
Message-ID: <CAJ8+Goid3YT68SiX+7VSJFNAWX9EF16yK++7shoSiTL5m+UmNA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-script-coord@w3.org
On Mon, Oct 17, 2011 at 07:27, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> No need for proxies.  Any property with a setter can enforce whatever
> restrictions it wants on the arguments passed to that setter.

You can only have setters for known properties which would only work
for fixed length arrays.

> But since we're talking about "host" objects, why are we excluding proxies,
> anyway, exactly?


> That's a really bad antipattern where a failure is reported at a point far
> separated from where it actually happens.  Sometimes that just has to be,
> but in those cases it's a necessary evil, not a desired property.

I'm with you here. These kind of objects would be painful to use if
they do not throw on [[Put]].

I'd rather have painless magical host objects than painful js objects.

Received on Monday, 17 October 2011 17:51:45 UTC

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