You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux shahar-desktop 4.8.0-27-generic docs: added a the #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Subsystem: ?
I find it useful to be able to inspect the contents of an object by by looking at it in an interactive session. I'll call this the "debug representation". What is the correct term, please?
Now that we have symbols I'm experimenting with using them as object keys. I think it should reduce chance of accidental name collisions/overwrites, if done properly.
Thing is—while inspection of objects with "normal" keys is easy:
{foo: undefined}// { foo: undefined }
Inspection of objects with symbol keys is hard:
letobj={[Symbol()]: undefined}obj// {}
While, obviously:
Object.getOwnPropertySymbols(obj)// [ Symbol() ]
😢
I expect this:
obj// { Symbol(): undefined }
It makes sense, doesn't it?
We already have this, so it makes sense to expect what I'm expecting, does’t it?