Hacker News new | ask | show | jobs
by 3dGrabber 908 days ago
People complaining about lack of JSX, HTML angle-brackets: I don't get it.

XML gets all the hate for being overly verbose (and for good reason [1])

however with HTML syntax, which is almost the same, everybody seems to be just fine...

[1] XML is sooo nineties, the "modern" developer uses markdown. inb4 S-Expressions

</rant> (...yes I know)

3 comments

It's a little more than that.

Some people feel that XML is great to represent nested structures/trees, and that trying to do that with code is less readable.

For me it's about not to learn yet another new syntax, and HTML is here to stay.
If you know JS (or any other C family language), the syntax is not new.

It's about getting rid of a flawed syntax.

But it'll probably never happen because people are used to it and oblivious to change.

Unless of course if one of the FAANG publishes it as their New FrameWork [tm], then everybody will jump on it, and people that don't are seen as "not modern".

Agreed. JSX is a bug, not a feature.
... and imposes a build step, for no good reason.
The preact team also dislikes transpiling jsx so they've developed an alternative using tagged template literals: https://github.com/developit/htm