Michael Haufe (2017-01-16T17:00:40.000Z)
The question came up recently on CLJS [1] on how to determine if an object
is safe to call as a Constructor.

Traditionally one uses try {... x = new foo() ... } catch(e) { ... x =
foo() }


In the list of well-known symbols [2] there doesn't seem to be a way to
reference [[Construct]] to perform a test to avoid the try/catch.  In the
following[3] though there is reference to Symbol.create which doesn't seem
to be in the spec but seems to be the one to look for. Can we get
clarification on if it is possible to determine if an object can be
constructed before attempting it?

[1] <
https://groups.google.com/forum/#!msg/comp.lang.javascript/nSesJfznwjg/rKiQOzkYEwAJ
>
[2] <http://www.ecma-international.org/ecma-262/7.0/#sec-well-known-symbols>
[3] <
https://github.com/lukehoban/es6features/blob/master/README.md#subclassable-built-ins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170116/cc60ccd7/attachment.html>
forbes at lindesay.co.uk (2017-01-18T10:37:16.566Z)
The question came up recently [on CLJS](https://groups.google.com/forum/#!msg/comp.lang.javascript/nSesJfznwjg/rKiQOzkYEwAJ) on how to determine if an object
is safe to call as a Constructor.

Traditionally one uses
```js
try {... x = new foo() ... } catch(e) { ... x = foo() }
```


In the [list of well-known symbols](http://www.ecma-international.org/ecma-262/7.0/#sec-well-known-symbols) there doesn't seem to be a way to
reference [[Construct]] to perform a test to avoid the try/catch.  In [the
following](https://github.com/lukehoban/es6features/blob/master/README.md#subclassable) though there is reference to Symbol.create which doesn't seem
to be in the spec but seems to be the one to look for. Can we get
clarification on if it is possible to determine if an object can be
constructed before attempting it?