Object.define ==> Object.mixin??

Mark S. Miller erights at google.com
Wed Dec 12 12:55:02 PST 2012


On Wed, Dec 12, 2012 at 11:57 AM, Allen Wirfs-Brock
<allen at wirfs-brock.com> wrote:
>>> How would throwing early versus throwing late make any different to you?
>
>> Because 1) late is a waste, the result is undefined anyway, 2) the exception
>> thrown is a lie, the operation did not die on the property reported but
>> continued and failed to die on an unreported number of subsequent
>> properties/
>
> Arguably, the operation didn't "die" at all.  Instead it made a best effort
> to do everything that was requested that could possibly be done.  I'll leave
> it to MarkM , if he wants to make more of a case.

I don't know that I have anything to add to the arguments already made
in this thread -- and I consider those arguments sufficient.

As to the above argument against, I don't understand it. In the
absence of proxies and with a non-deterministic update order, any
outcome by the new proposed ES6 rule is an allowed outcome by the ES5
rule. In this sense, it is not even a breaking change. The only
remaining objection above I see is "is a waste". I don't care about a
bit of extra runtime overhead in the thrown-error case.


--
    Cheers,
    --MarkM


More information about the es-discuss mailing list