>What if we'd always had something like this in js? What if html would use round brackets and just use the closing bracket instead of the closing tag? e.g. foo could be: (html (body (div 'foo'))) Something similar could be done for javascript. Instead of writing html in javascript we could write javascript in html. Just imagine if we could represent the code as html or in that round bracket form: function inc (x){ re…
If you want to see a mature library that uses this syntax to represent both DOM elements and code, I'd suggest checking out Reagent[1].
[0] https://en.wikipedia.org/wiki/Lisp_(programming_language)