Andreas Rossberg (2013-07-15T16:25:16.000Z)
On 15 July 2013 17:01, Jeremy Martin <jmar777 at gmail.com> wrote:
>> s === Object(s)
>
> This should throw a TypeError.  In the case of a Symbol, `Object(value)`
> results in `ToObject(value)` [1].  And, in the case of Symbol, ToObject
> should throw a TypeError [2].
>
> [1] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.2.1.1
> [2] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-9.1.9

I'm not sure how up-to-date the spec is on that. In any case, it's not
what I would expect either (or what's currently implemented in V8, for
that matter). My assumption was that Object(symbol) works analogous to
Object(string) and returns a wrapper object. That is,
`Object(Symbol())` is equivalent to `new Symbol`.

/Andreas
domenic at domenicdenicola.com (2013-07-23T17:39:12.202Z)
On 15 July 2013 17:01, Jeremy Martin <jmar777 at gmail.com> wrote:
>> s === Object(s)
>
> This should throw a `TypeError`.  In the case of a Symbol, `Object(value)`
> results in `ToObject(value)` [1].  And, in the case of Symbol, ToObject
> should throw a `TypeError` [2].
>
> [1]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.2.1.1
> [2]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-9.1.9

I'm not sure how up-to-date the spec is on that. In any case, it's not
what I would expect either (or what's currently implemented in V8, for
that matter). My assumption was that Object(symbol) works analogous to
Object(string) and returns a wrapper object. That is,
`Object(Symbol())` is equivalent to `new Symbol`.