3 ms·
I do, in theory, understand separation of concerns. But as someone who works on a sprawling set of template files with loads of sprinkled conditionals in a tem
by rtpg 4y ago
I do, in theory, understand separation of concerns.
But as someone who works on a sprawling set of template files with loads of sprinkled conditionals in a template language... the idea of using a "real language" for the templating, and in particular having type checking and proper abstraction tools (you can just write functions! No weird template tag tricks) is so much nicer to me.
HTML templates have always felt super brittle to me, basically at the level of C preprocessor programming. Even just with React/TS you can get away with so much with way more confidence given the typed backing.
Though I think that you _could_ get away with some nice tricks in Rust thanks to macros, where you ingest the template files and generate render functions with all the properties... or something like that.