3 ms·
No, I think a closure is as useful and can do anything a "class object" can... What exactly do you think a class can do that you can't replicate in this patter
by eatonphil 12y ago
No, I think a closure is as useful and can do anything a "class object" can...
What exactly do you think a class can do that you can't replicate in this pattern? Inheritance? Pass the parent function in. Typeof? Store a type value or get the function name reflectively.