Re:JSX in detail
by davexunit on Friday September 08, 2017 @09:31AM
(#15199990)
Lisp comes with a built-in templating system: quasiquote. Systems such as SXML (an s-expression representation of XML documents) build on top of that. This takes care of multiple problems with JSX: 1) writing HTML/XML is annoying (remembering to put the close tag in the right place, etc.) 2) JSX is a DSL, not an embedded DSL, so you need new compiler infrastructure to work with it.
Here is a snippet of real code that produces an SXML tree. It generates atom feeds for websites that use a static generator I wrote:
Here is a snippet of real code that produces an SXML tree. It generates atom feeds for websites that use a static generator I wrote:
By far the best templating system I've ever used.