3 ms·
JSX has do expressions, which don't exist in JavaScript, so it's a DSL.
by Touche 10y ago
JSX has do expressions, which don't exist in JavaScript, so it's a DSL.
- magic_quotes 10y agoNo, it doesn't have do expressions.
- barrkel 10y agoAs 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.)