a reflection on if and how "this" is used inside a function, would reveal what inner-interface it uses to some object, also also if it mutates its properties. every function mutating this-bound objects is potentiallyt a cinstructor. afaik:
new Foo(); is aequivalent to Foo.call(Object.create(Foo.prototype)) with an implicit "return this" at Foo"s end. On 1/20/17, Michał Wadas <[email protected]> wrote: > It would be equivalent to solving halting problem. > > Any function like "isConstructor" have to return three possible values - > "yes" (native constructors, classes without constructor), "maybe" (can't > determine), "no" (arrow functions, methods, generators). > > On 20/01/17 04:03, Scott Sauyet wrote: >> if there was any way to distinguish a function like this > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

