|
|
|
|
|
by dustinfarris
3409 days ago
|
|
Why introduce additional syntax when the native language works fine? Elm is a functional language, and you build the desired DOM structure with functions. Why should it be any other way? JSx looks sort of like HTML, but HTML isn't even the target here, just DOM nodes. |
|
Lisp-style 'S-expression' syntax for describing documents never took off. We have to take something from that - it seems the vast majority of developers don't enjoy that syntax, irrelevant of how 'simple' its just-functions nature makes it.
JSX also 'targets DOM nodes', but I don't see what that has to do with anything.
The closer correspondence between how JSX looks, what you see in your browser DevTools, and how it seems that most developers prefer to mentally model documents ... is where the win comes from IMO.
The reality is the vast majority of React code I see uses JSX, even though it's optional. It's been hugely successful in React world and I don't think that should be ignored by Elm.