Implicit coercion of Symbols
Brendan Eich
brendan at mozilla.org
Sat Jan 3 12:56:26 PST 2015
Axel Rauschmayer wrote:
>> On 03 Jan 2015, at 19:52, Brendan Eich <brendan at mozilla.org
>> <mailto:brendan at mozilla.org>> wrote:
>>
>> None of the objects in the examples bz cited are Arrays -- what did
>> you mean?
>
> When I though of `+` being used inside square brackets, I only thought
> of strings, not of numbers (first example).
>
> In the first example, `this` is at least array-like. Otherwise,
> `slice` wouldn’t work.
Sure, but you wrote "Arrays", not array-likes. Also bracketing for
computed property access works with any object, not just array-likes.
Sorry to be nit-picky but precision required here ;-).
/be
>
>> Axel Rauschmayer wrote:
>>> Arrays are a good point, this is where I’d think accidental
>>> coercions are most likely.
More information about the es-discuss
mailing list