A Prototypal Discussion
It spurred some good discussion there people talked about whether you can use some of this today.
Jeremy Ashkenas (CoffeeScript++) said:
I’m sorry to be difficult about this, but … Like many other Crockford-inspired takes on the subject, vjeux’s article is massively bad advice.
Object.create is similarly not available everywhere. It’s not available in Firefox < 4, IE < 9, or any version of Opera. Crockford's version of Object.create is not compatible with the native Object.create — and if you patch it in, you may end up breaking libraries that expect the real thing.
But let's say you had it all sorted out, and you had a sane plan for using the native Object.create, and falling back to Crockford's implementation where unavailable … it's still not a great pattern.
Now, I don’t think that Christopher was writing the post in a “use this now!” vein, but rather in a “let’s discuss prototypal inheritance and how it works” one, but is is good to talk about the real world issues today too.
I don’t know if I would worry too much about the micro-benchmark unless it is an issue in your application. For one, it was pointed out that the poor performance in