| ▲ | btown 2 hours ago | |
Whenever I see a DSL where part of the DSL's responsibility is to have arbitrarily complex mathematical expressions, my reactions are (a) why???, (b) well, if they're going to do it, they should have a formal language specification with a derived lexer and parser, and (c) the product needs a robust stdlib with compatibility across build targets. From what I see in https://github.com/expo/exact/blob/main/contract/syntax/src/... and https://github.com/expo/exact/blob/main/contract/syntax/src/... - it's unclear this will scale to the levels of complexity that arbitrary UIs demand. | ||
| ▲ | miffy900 an hour ago | parent | next [-] | |
This is why I have strongly preferred JSX over any other UI DSL (specifically the typescript variant, TSX) I've tried. It looks like a DSL, but it actually isn't - it's just regular javascript/typescript with a very thin 'declarative/markup' veneer. it basically tricks you into thinking you're writing a HTML-like UI-DSL, but it also just so happens to accept arbitrary JS expressions, because it is just regular JS. | ||
| ▲ | vmg12 2 hours ago | parent | prev [-] | |
My understanding is that you arent supposed to write the entire UI in contract. You are supposed to write as much as you can with it and do the rest in js or rust | ||