- Javascript / Typescript
- Lua (this)
- Go ( https://templ.guide )
- Ruby ( https://github.com/camertron/rux )
Any others?
- Javascript / Typescript
- Lua (this)
- Go ( https://templ.guide )
- Ruby ( https://github.com/camertron/rux )
Any others?
For Ruby it's strange somebody would prefer to write JSX instead of something like dhtml [2] or [3], are there any other advantages of writing xml directly in the code instead of a small html DSL?
[1]: https://xelaso.net/blog/jsx-quasi-quoting/
[2]: https://github.com/hi5dev/dhtml
[3]: https://stackoverflow.com/questions/23469834/ruby-metaprogra...
As for preferring to write XML directly in my code…95% of my goal is to just deliver XML to the browser. I’d rather just write XML. And honestly the way text nodes are handled in other DSLs seems quite bad to me. I’d much rather write `long paragraph, <strong>emphasis,</strong> long paragraph` than HEREDOC-style long strings that I have to start and end every time I want some inline formatting.
All the examples I see of HTML DSLs are heavy on structure but conspicuously lacking text. For me the text is _the whole point_. I don’t want to worry about string escaping when writing a blog post.