3 ms·
You instantiate an object and then poke methods into it? Ever heard of umm, classes?
You instantiate an object and then poke methods into it? Ever heard of umm, classes?
Classism is the cancer that is killing OOP
Prototype-based OOP is an alternative to class-based OOP. See the Self, Javascript and IO languages for examples.
I'm not making any claims as to which is "better", just pointing out that it's a valid way of doing things.