Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

sorry to be a hater, but while I find the idea of mixing js and html not great, the alternative being offered up here is to introduce a new language and mix that in with html instead of js. isn't that counterintuitive? wouldn't it be better to just use actual js in your templates instead of this arbitrary {{}}-based stuff?


It's a very familiar style of markup that I find immediately intuitive. The benefit being that it separates the markup from the code populating it.


{{tag}} is not "valid" markup (it will pass a validator but has negative semantic value), which is even worse than mixing a little well crafted logic into your display code.


Using {{tag}} notation seems to work well enough on Wikipedia -- could you elaborate on the difference between Tempo's use and Wikipedia's?


I don't seem much difference, but I also prefer when making websites to keep down the number of languages I have to know. Already html + css + js + a server side language is enough, introducing another seems excessive when your templating language could just be js or perhaps the same server side language you already use.

we do the same for our server side templating when making sites, using php for controller & model code, but also arbitrary php as the template language in the view too. it seems to work well, and avoids the need to learn something new.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: