Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
RobertWHurst
· 4y ago · 0 comments
At least in V8 they are last I checked. The symbols feature is a property privacy feature. A symbol can be treated as a private secret owned by a library thus restricting access to a property on a shared object.
Comments
[–]
qubyte
4y ago
This is untrue. Symbols provide no privacy. They provide a mechanism to avoid collisions. You can even ask an object for its symbol properties:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...