News for hackers. Stuff that matters.
Re:Flare Programming Language by Yahivin on Monday February 06, 2023 @11:33AM (#34679887)
Ah, the ancestor of JSX.
Re:Flare Programming Language by rektide on Monday February 06, 2023 @12:32PM (#34680898)
Grandparent. Dont forget es4!

Eh. 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);
Re:Flare Programming Language by eyelidlessness on Monday February 06, 2023 @12:50PM (#34681210)
> 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.

Re:Flare Programming Language by WorldMaker on Monday February 06, 2023 @07:01PM (#34686445)
The 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.)