Hacker News new | past | comments | ask | show | jobs | submit login

JSX doesn't have control flow. Therein lies all the difference.

Javascript's void-typed statements are a problem, though.




JSX has do expressions, which don't exist in JavaScript, so it's a DSL.


As far as I'm concerned, a language doesn't need control flow, much less Turing completeness, to be a DSL. I don't deny that JSX is a DSL.

But when an embedded template language grows control flow, it creates two different ways to do things. The outer language has control flow, and the DSL. The choices increase complexity. TMTOWTDI is not actually a great idea.

(AFAIK JSX only has 'do' by way of Babel. But it's just syntax sugar for creating a function and calling it. So you can get your control flow that way; but it'll be Javascript control flow.)


No, it doesn't have do expressions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: