Message from JavaScript discussions

May 2017

— What I find myself more annoyed with, though, is how some people use it, using builtins which are proven to be the slowest compared to other builtins

Message permanent page


Or using innerHTML a ton and no node-mutating methods as if they are working with HTML only, which isn't the case, but there are so many people who assume HTML is as tightly married to the DOM as a live element

— Fact is HTML has very little to do with what's in the actual DOM and every time you work with it you are making the DOM do backflips you could avoid just by talking to it directly, stuff like hyperspeed document fragments

Message permanent page

— So while I want improvements I think the majority of developers may wind up ignoring them

— Just need to invent an entirely new platform

— Well, it's easy enough to tack on your own code to the DOM

— It is a somewhat simple structure of objects, and the builtins perform simple tasks

— Sure, but it's still a giant bloaty mess

— Quite, with a lot of messy circulars

— You would need an agent-based model for traversing it, which in fact traverses a simpler, simulated version of the DOM, but mutates the real DOM

Message permanent page

— A stack & map would suffice, with the stack representing totality of information and the map representing the relationships

Message permanent page

— Then, operations like querySelectorAll can linearly operate on the stack with quite good performance