Hacker News new | ask | show | jobs
by crdrost 2254 days ago
Possibly because JS did that (it has been a thing since Self I think? Or maybe that was just the prototypal inheritance—I never can remember) and the confusion between the symbolic properties and the key properties kept coming up. Like, you have that x.abc is the same as x["abc"] but then things start to break because many dict objects have a .__proto__ or whatever and so they start to fail in interesting ways when you allow users to store their own strings in the keys and they overwrite something you were using later on.

JS now has a dedicated Map type to work as a proper dictionary.

1 comments

> it has been a thing since Self I think? Or maybe that was just the prototypal inheritance

Just the inheritance.