Hacker News new | ask | show | jobs
by Havvy 4238 days ago
Yeah, but that falls under epediaman's "Stop over-engineering. YAGNI!" quote.

If you want the benefits of `new` without exposing your interface, you should totally wrap it.

But if you're going to have boilerplate like that for code that not's performance critical (and most of it is not), why not just go for Object.create() and returning the instance yourself. Less action at a distance.