Community Member Profile
- Profile: /members/8250-Tim-Lind.htm
- URL: http://jay.ngspinners.com
- Comments: 4
- Points: 43
Recent Blog Comments By Tim Lind
-
Object.create() Improves Constructor-Based Inheritance In Javascript - It Doesn't Replace It
Posted on May 3, 2011 at 12:24 PM
@Ben, I'm sure you're right about people sometimes do to try and get away from what they feel is a broken inheritance mechanism. I'm interested to know why you think people regard it as broken, if you feel like blogging about that sometime. My main motivation for the Jay projec... read more »
-
Object.create() Improves Constructor-Based Inheritance In Javascript - It Doesn't Replace It
Posted on May 3, 2011 at 11:10 AM
Well, I'm not sure why anyone would really want to use Object.create as full on inheritance mechanisms for structured types, but I'm glad that you've come to appreciate the elegance that it brings to the definition of constructors. As I've pointed out on the last post, you need more than just Obj... read more »
-
Your Javascript Constructor Logic May Break Prototypal Inheritance
Posted on Apr 29, 2011 at 8:06 AM
@Ben, Ok, I think there are several problems that you were describing, and to be honest I didn't read thoroughly enough to look at the other problems. What I'm pointing out is that the issue of both instances having the same value is something that can be caused because the construct... read more »
-
Your Javascript Constructor Logic May Break Prototypal Inheritance
Posted on Apr 29, 2011 at 6:00 AM
Your problem here is the way you create a prototype chain, not the logic of the constructor. You should never create a prototype chain like this, despite what some teaching indicates. // Extend the Person class. Girl.prototype = new Person(); That is what causes your probl... read more »



