Yes, if you eliminate the "just JS" part and add conditionals and loops to the template language, it works.
-
-
I think you are optimizing for parsers rather than humans. It behaving like HTML means not having to ramp up on a dsl.
-
I'd say the opposite! Cramming the syntax into HTML makes it harder for humans to know which is real HTML and which is a conditional/loop.
-
But either way, in both syntaxes you need to learn the syntax for conditionals and loops.
-
I like to keep conditionals and loops in real js whenever possible. Turns out there is already a syntax for both! :)
-
One of the benefits to having templates in the js is that you write more real js and less magic... imo
-
Fair enough. I think you might be undercounting the cognitive costs to some in mixed JS/XML but again YMMV.
-
I think the level of adoption speaks for itself.
-
Handlebars is extremely popular too. As I said, different strokes for different folks.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.