Comment by 90s_dev

Comment by 90s_dev 2 months ago

2 replies

The only inherent feature of JSX is compile time "parsing" whereas tagged literals inherently require runtime string parsing.

But yeah other than that you're right. I'm just talking about first-class VS Code support. Which to me means a lot.

nine_k 2 months ago

Of course tagged string literals can be compiled down to a form where no string parsing occurs. This is a really old technique; I implemented it, like many others, in PHP in late 1990s.

Vut inside an IDE or an LSP, tagged literal strings need quite a bit more special support than JSX, AFAICT.

  • 90s_dev 2 months ago

    Do you mean at runtime but only once at startup, like parsing a Lua program into bytecode? Or do you mean at true compile time like Zig and Rust format strings?