3 ms·
A very simple and elegant way to handle inheritance is to give each object a pointer to another object -- let's call it "prototype" -- and delegate any failed m
by pjscott 14y ago
A very simple and elegant way to handle inheritance is to give each object a pointer to another object -- let's call it "prototype" -- and delegate any failed member variable or method lookups to the prototype. This is how JavaScript's object system works.