To those looking at this question for the first time, I'm trying to find a correct OOP model I can use in JS. I initially found a very different solution from what's normally done, and I received lots of help from some of the good guys here :) The links above tell the whole story.
- I was glad you edited and changed the override method to use bind. I wasn't confortable with that _SuperiorChainer thing. I found it too complicated and very strange to use. With bind, it got much better.
- Instead of creating 2 methodtwo methods: one for normal classes, and one for view classes (dev_prop and def_view_prop), I overridenoverrode it and reduced it's name. I think it got clear enough and pratical enough.
- I loved the idea of using def_view_proc
def_view_proc
instead of parsing the class. Much better.
- I loved thisthe way of defining a property using descriptors with a smaller syntax. It rememberedreminded me the old Dephi times. I found Delphi properties definition very useful. I pushed descriptor.enumerable to the function tough, and created a defHidden method just in case.
- I've put
function is_function(obj) { return obj instanceof Function };
inside of overridethe overwritten function. It's only used there and as you recommended to me, we should avoid global context functions. If it's needed anywhere else I'll remove it from there and create an utility class or something.
- I changed the name from inherit_from_to
inherit_from_to
to extendextend
. Small and equalyequally explicit.
- I loved the much cleaner code, removing showOperators
showOperators
method and stuff. I'll definitivelydefinitely will use method descriptions more.
So what do you think ? Any final comments?