This is definitely a clean solution! One thing bugged me though.
Juha Pekkarinen
352

My concern is with memory footprint. When you create a function and assign it to an instance property (as you are suggesting), the entire function is duplicated for each instance. When using bind, only a small native lambda function is added to each instance and the main function remains on the prototype.

An instance method is no big deal when you have only one, or even a few class instances, but it’s just not a pattern that I can support. Maybe I’ll come around someday. :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.