It sounds like you're explicitly adding function properties to every object. This is slow and wasteful or memory. In Python, method lookup scans the __class__ of the object to find the method function. Python also automatically binds the object instance to the first (self) parameter.
What you're describing does not bear much resemblance to Python.
This is true, but I believe that in modern JS implementations, the performance difference isn't as large as one might expect.
The similarity to Python is limited to syntax — I just wanted to raise the point that in both Python and prototype-free JS, higherOrderFunction(object.method) does what it looks like it will do.
Comments
It sounds like you're explicitly adding function properties to every object. This is slow and wasteful or memory. In Python, method lookup scans the __class__ of the object to find the method function. Python also automatically binds the object instance to the first (self) parameter.
What you're describing does not bear much resemblance to Python.
This is true, but I believe that in modern JS implementations, the performance difference isn't as large as one might expect.
The similarity to Python is limited to syntax — I just wanted to raise the point that in both Python and prototype-free JS, higherOrderFunction(object.method) does what it looks like it will do.