Posts

Showing posts with the label _super

The JavaScript _super Bullshit

I know you already hate the title, but that's how I called one paragraph of my precedent post: Better JavaScript Classes . This post is mainly dedicated for both libraries authors, and those Classic OOP Developers that still think JavaScript should be used in a classic way. _super or parent Are Problematic! It's not just about performances, where " the magic " may need to replace, wrap, and assign runtime everything in order to make it happens, it's about inconsistencies, or infinite loops, or hard debug, or disaster prone approach as well, since as I have already said instances have nothing to do with _super/parent .... so, how are things? Thanks for asking! Real OOP Behavior It's the ABC, and nothing else, if we call a parent/super inside a method, this method will execute with a temporary self/this context. This means that the instance will be still: an instanceof its Class only that method will be executed, it is possible to call other super/parent accord...