Skip to content

Comment on Stop Using Constructors in JS (2012)parent

Comments

I find it odd that you rail against absolutes and then immediately turn around and defend your own.

If you meant that new is faster today, say so. That's not the same as "will always outperform".

I said there are few absolutes, not that there are no absolutes :)

`new Foo` has simpler semantics than `Object.create(FooProto)` and therefore I believe it will always be faster. That performance gap can of course narrow, but I think `new` will always be the fastest. Happy to be proved wrong.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.