News for hackers. Stuff that matters.
Re:VanJS: A 0.9KB JavaScript UI framework by 3dGrabber on Wednesday December 20, 2023 @09:17AM (#38708935)
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)

Re:VanJS: A 0.9KB JavaScript UI framework by sabellito on Wednesday December 20, 2023 @09:23AM (#38708990)
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.

Re:VanJS: A 0.9KB JavaScript UI framework by norman784 on Wednesday December 20, 2023 @09:26AM (#38709014)
For me it's about not to learn yet another new syntax, and HTML is here to stay.
Re:VanJS: A 0.9KB JavaScript UI framework by 3dGrabber on Wednesday December 20, 2023 @09:42AM (#38709176)
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".

Re:VanJS: A 0.9KB JavaScript UI framework by flying-pig on Wednesday December 20, 2023 @09:52AM (#38709274)
Agreed. JSX is a bug, not a feature.
Re:VanJS: A 0.9KB JavaScript UI framework by 3dGrabber on Wednesday December 20, 2023 @10:02AM (#38709384)
... and imposes a build step, for no good reason.
Re:VanJS: A 0.9KB JavaScript UI framework by fs_tab on Wednesday December 20, 2023 @02:53PM (#38712839)
The preact team also dislikes transpiling jsx so they've developed an alternative using tagged template literals: https://github.com/developit/htm