News for hackers. Stuff that matters.
Re:Advanced objects in JavaScript by TazeTSchnitzel on Monday August 25, 2014 @11:40AM (#8222237)
The point of it is you can implement private properties, as I understand it:

    function MyClass() {
        var mysymbol = new Symbol("foo");
        this[mysymbol] = 3;
    }

    var bar = new MyClass();
    bar.foo // this won't work
Re:Advanced objects in JavaScript by Tloewald on Tuesday August 26, 2014 @09:23AM (#8226919)
What a convoluted mechanism! But where do you keep your reference to the symbol to keep it private? Anywhere you keep it (e.g. in a closure somewhere) that's private doesn't need symbols, so what problem does this solve?

And surely in your private context, bar.foo should still work.

Re:Advanced objects in JavaScript by Tloewald on Tuesday August 26, 2014 @09:19AM (#8226906)
What a convoluted mechanism!