3 ms·
This comment gets some pretty important fundamentals wrong. > The real bugbear here is JS though, HTML and CSS are complex but workable. JS is an ever-moving t
by cxr 4y ago
This comment gets some pretty important fundamentals wrong.
> The real bugbear here is JS though, HTML and CSS are complex but workable. JS is an ever-moving target
What you characterize as "JS" is, in reality, more HTML and CSS than JS. JS is a language. The fact that all the behavioral details of the HTML and CSS objects and related host objects have bindings available to JS programs does not make those things "JS"...
Doing a new JS engine from scratch is an order of magnitude easier than doing a browser engine. It is directly analogous to the eminently tractable "building a compiler" problem that the other commenter mentioned.
- noirscape 4y agoFair. I meant JS here as in "fully DOM compatible, as-used-in-your-browser JS". JS engines themselves aren't that hard to make (I think there's about 9 or 10 actively maintained ones?), but to make one that's usable in situations that aren't things like node or as a sub-language in a different project... that's far more difficult.
- cxr 4y ago> "fully DOM compatible, as-used-in-your-browser JS" That's still wrong. s/DOM// s/JS/DOM/ Continuing to say JS when you're really talking about what is, again, still in the land of HTML, CSS, etc just confuses things. Viz: > to make [a JS engine] that's usable in situations that aren't things like node or as a sub-language in a different project... that's far more difficult It's really, really not about JS. You don't make a browser that's compatible with the Wild Wild Web by adding stuff to the JS engine. You do it by implementing moar browser.