4 ms·
Ah, the ancestor of JSX.
by Yahivin 4y ago
Ah, the ancestor of JSX.
- rektide 4y agoDont forget es4! EcmaScript's cancelled version had e4x, "EcmaScript for XML", a DOM alternative to make working with xml easier. https://en.m.wikipedia.org/wiki/ECMAScript_for_XML https://en.m.wikipedia.org/wiki/ECMAScript_for_XML There's probably others in the tree! But I do think of e4x & how broadly it was lambasted/hated, when I think of how easy & pleasant jsx is. One noteable feature of e4x was that it's a unified data model. jsx is syntax that feeds a very complex internal data model; it's in effect write-only. e4x was well mapped to simpler objects, sort of. var person = <person><name>Bob Howard</name></person>; console.log(person..name);
- eyelidlessness 4y ago> jsx is syntax that feeds a very complex internal data model This really depends. I feel like a broken record, I mention it so frequently, but JSX has no built in semantics. In React and other VDOM libraries it may be complex. But in Solid for instance it’s effectively the declarative subset of E4X.
- WorldMaker 4y agoThe JSX data model isn't that much worse than the regular DOM. In many areas it is certainly much simpler. For a while different Virtual DOMs had somewhat different "internal" variants but as React has worked to simplify their internal model over their versions they've all mostly kind of converged at this point and React's virtual DOM objects are just about a de facto standard. (I've done a tiny bit of virtual DOM meta-programming over the years for various reasons. It's more pleasant than you would expect. TSX has a lot of useful type information for it, even.)