3 ms·
> We shouldn’t expect the objects in JavaScript to perfectly translate to their DOM counterparts or vice versa. Since JavaScript was invented specifically to m
by naasking 3y ago
> We shouldn’t expect the objects in JavaScript to perfectly translate to their DOM counterparts or vice versa.
Since JavaScript was invented specifically to manipulate the DOM, I'm not sure that that follows.
- jacobsimon 3y agoThat's definitely one of the main original use cases, but it would have been a bad decision to base the entire language around the limitations of HTML, and I doubt JavaScript today would be the most popular programming language today if they had. You can read the original ECMAScript 1 standard here, which is titled: "A general purpose, cross-platform programming language"[1]. https://ecma-international.org/wp-content/uploads/ECMA-262_1st_edition_june_1997.pdf https://ecma-international.org/wp-content/uploads/ECMA-262_1...
- AmpsterMan 3y agoI think a lot of people dislike that JavaScript is a general purpose programming language, rather than being a scripting engine for browsers.
- wredcoll 3y agoA lot of people dislike any tool that actually has wide spread usage. No one complains about tools that have been abandoned.
- triceratops 3y ago"There are only two kinds of languages: the ones people complain about and the ones nobody uses." - Bjarne Stroustrop