Hacker News new | ask | show | jobs
by troupo 19 days ago
It's not really a design limitation, as this way it simplifies the parser, the DSL, the templating... Basically everything. And your entire templating/parsing could be just "convert this to a function call"
1 comments

Yes, it simplifies the engine, at the cost of developer experience. Like useMemo, that now is compiled in automatically with the new react compiler.
> Yes, it simplifies the engine, at the cost of developer experience.

Given that its taken the world by fire and nearly everyone adopted JSX/TSX as the templating language, doesn't seem like developer experience suffered.

> Like useMemo, that now is compiled in automatically

A completely different beast, and this one definitely makes DX suffer.

There are many reasons why JSX is popular, react being the biggest one, where subsequent frameworks wanted to leverage people’s knowledge.

However angular, svelte, vue and more have a specific DSL for templating.