4 ms·
>Vuejs is adding it's own tags to html like if and for. Which requires another DSL to learn when i use simple js(not advanced js) in react. I'm not familiar wi
by arnorhs 10y ago
>Vuejs is adding it's own tags to html like if and for. Which requires another DSL to learn when i use simple js(not advanced js) in react.
I'm not familiar with the concept of simple js vs advanced js in react. But your statement about Vue's tags being its own dsl holds true for jsx as well.
- barrkel 10y agoJSX doesn't have control flow. Therein lies all the difference. Javascript's void-typed statements are a problem, though.
- Touche 10y agoJSX 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.)