eval on non-strings

Brendan Eich brendan at mozilla.org
Tue Feb 28 03:07:54 PST 2012


Andreas Rossberg wrote:
> On 28 February 2012 11:04, Brendan Eich<brendan at mozilla.org>  wrote:
>> Fail-soft in JS1 was an artifact of lack of try-catch combined with too much
>> rushed Unix philosophy. In cases such as delete you could get a status
>> result (boolean telling whether the delete failed hard if false, else either
>> succeeded or found no "own" property if true). In other cases of course an
>> implicit coercion was done (*sigh*).
>>
>> All water under the bridge but I agree we should not add more. Where do you
>> see new fail-soft (or worse, fail-soft with ambiguity) being added?
>
> Mainly destructuring, especially the implicit ToObject conversion of
> the RHS that we have discussed a couple of months ago.

Oh right. Another implicit conversion, indeed. We could revisit this if 
you feel strongly enough. It does not make me *sigh* though, because 
destructuring signals intent to pluck properties off of objects, and as 
I recall Allen suggested people will use this with a primitive RHS to 
get at prototype methods.

So I'm still in favor of the spec as proposed (and implemented in JS1.7+ 
in SpiderMonkey and Rhino -- no complaints or lost toes or fingers, to 
my knowledge).

/be


More information about the es-discuss mailing list