Hacker News new | ask | show | jobs
by emodendroket 3278 days ago
Oh yeah, that's another great point (although you're still stuck with the fact that somebody can access object properties by key).
1 comments

Couldn't you solve this with privates, either via a naming convention or with symbols, as well as using getters?
Not really. If I declare that an object has property xyz obj.xyz and obj['xyz'] are both valid ways of addressing it.