| Thank you for responding! Yes, I think we are on the same page. I did not want to include "legacy" prototype-based inheritance examples because I'm on a phone and didn't want to make complexity
explode here. Also I made a weird statement here: > That can also be done after the class was declared? That doesn't make much sense for binding "this" to the class that was declared, I wsd mixing up arrow function class properties inside the class declaration with adding prototype properties (which is exactly what one doesn't want for classes with many instances). In the scope of the class declaration, all methods of adding methods to the prototype are awkward, I guess. Regarding the "early-binding" using .bind or arrow functions in constructor, I see your points, and it's the subtle and hard-to-explain differences that are really annoying. JS really requires some discipline and sticking to a pit of success, while it's still essential to know the basics. > Late binding is an old feature that feels like a bug today, so a lot of people work very hard to early bind functions or only ever use arrow functions because they don't trust late binding Yes, that's what I was going at, thanks for making clear the difference between arrow functions (lexical scoping) and using `bind` (arbitrarily fixed "this"). I was lately (no pun!! really coincidence, it just wasn't only recently) using late binding with object literals in tests with Jest and TS and had to ignore TS there, it's pretty much the major reason I'm commenting here. It was convenient and succinct for a mock object implementing an interface otherwise used by class instances to use late binding. |