WTF!?
So Javascript has these functions to get the nodes in a document…
But because this language is dogshit invented by a complete and utter failure of a homophobic organism, those are of course not compatible with the standard iteration protocols of the language and you can’t just write
No,
Seriously, how has this failure of an excuse for a programming language managed to stay the only language shipped in browsers? Why did google not just force dart into chrome and tell people to use something that’s at least slightly less shitty?
Like how many different sequentially accessible container types that all have different and incompatible interfaces and are various degrees of difficult to turn into something usable does this crap have?
#Javascript #ecmascript #js #webdev
So Javascript has these functions to get the nodes in a document…
document.createTreeWalker and document.createNodeIterator that create a TreeWalker and a NodeIterator respectively.But because this language is dogshit invented by a complete and utter failure of a homophobic organism, those are of course not compatible with the standard iteration protocols of the language and you can’t just write
document.createNodeIterator(document.body, NodeFilter.SHOW_TEXT).forEach(n => use(n));, because that would be way too easy!No,
NodeIterators and TreeWalkers have their own incompatible interface and there isn’t even an easy way to convert them into an array or something similarly usable, because again, that would require to have more than room-temperature IQ when designing a language, and we all know that homophobes lack that!Seriously, how has this failure of an excuse for a programming language managed to stay the only language shipped in browsers? Why did google not just force dart into chrome and tell people to use something that’s at least slightly less shitty?
Like how many different sequentially accessible container types that all have different and incompatible interfaces and are various degrees of difficult to turn into something usable does this crap have?
#Javascript #ecmascript #js #webdev

