Only numeric keys for arrays?

26 views
Skip to first unread message

Michael McGlothlin

unread,
Sep 29, 2015, 3:49:57 PM9/29/15
to Strengthen JS
I was having a mystery issue and finally discovered that I'd changed a key value I was using to access an array from numeric to boolean. The code was running in strong mode so I am a little surprised there weren't any red flags complaining about attempting use of a bool as the key. It seems non-numeric keys are a oft lamented issue with arrays so shouldn't they throw an error in strong mode?

Andreas Rossberg

unread,
Sep 30, 2015, 9:30:31 AM9/30/15
to Michael McGlothlin, Strengthen JS
On 29 September 2015 at 21:49, Michael McGlothlin
Yes, you are absolutely right. The restriction of index expressions
(to strings, numbers, or symbols) is one of the implicit conversion
restrictions that we haven't finished implementing yet.

We have made significant progress with the strong mode implementation,
but it isn't quite done yet. I intend to send an update to this list
in a little while. I would say that we are at 80% atm.

/Andreas
Reply all
Reply to author
Forward
0 new messages