News for hackers. Stuff that matters.
Re:Deku: How we built our functional alternative to React by hcarvalhoalves on Tuesday May 12, 2015 @12:43AM (#9529647)
> Mixing HTML and JS is not elegant at all.

Unless you know LISP, then you understand code is data.

Re:Deku: How we built our functional alternative to React by davexunit on Tuesday May 12, 2015 @08:54AM (#9531336)
Trust me, I know Lisp. In Lisp, there's built-in templating via quasiquote, so we can easily construct HTML documents by first writing them as s-expressions.

JSX is a far cry from how Lisp does things. You get all of the nastiness of the redundant typing involved with hand-writing HTML mixed in with your JavaScript, plus the addition of another compilation step in your build!

I like Mithril's virtual DOM API[0] much more. It's really pleasing to use, but of course not as good as SXML in Lisp because JavaScript doesn't have macros or quasiquote.

[0] https://lhorie.github.io/mithril/mithril.html

Re:Deku: How we built our functional alternative to React by Touche on Tuesday May 12, 2015 @08:45AM (#9531292)
But JS isn't lisp, and to manipulate it you have to turn it into an AST and traverse it with a lot of extra tooling. It's not as (easily) pliable as lisp.