Determining if an object can be constructed

Scott Sauyet scott at sauyet.com
Sat Jan 21 02:52:07 UTC 2017


Bradley Meck wrote:
>> 1. every call to `new Foo(...args)` creates a distinct object not
>> reference-equal to any other such call.
>
> Would this mean
>
> ```
> function factory() { return []; }
> ```
>
> would qualify as a constructor?

I'm thinking of that as a necessary, but not a sufficient condition.

If it fails that test it cannot be a constructor.  It's clear that
there are other tests.  It's not clear to me what they are.

  -- Scott


More information about the es-discuss mailing list