3 ms·
This is an API issue (DOM), not a language one.
by samastur 5y ago
This is an API issue (DOM), not a language one.
- da_chicken 5y agoDeflecting to semantics or categorization isn't a defense.
- christophilus 5y agoSimilarly, C is crappy because operating system APIs are crappy.
- samastur 5y agoMy point it that it is a defined behaviour of the DOM API which is generally implemented in C++ and exposed to Javascript environment. It behave exactly the same way if you use bindings for any other language. It's not an ECMAScript defined feature. You can also implement exactly this behaviour in any language so how is this then a Javascript language issue?
- snovv_crash 5y agoNo, it's a language issue. The language doesn't let you specify that things cannot go out of scope 'spookily', so it is ambiguous and you have to trust things like documentation. Just like it's easy to make memory management issues in C, this is the kind of thing that's easy to get wrong in JS.