Hacker News new | past | comments | ask | show | jobs | submit login

But he could have used an existing template language. Seems like he only needs some templates with sub-templates and there are many solutions for that. Angular 1 with ui-router is for example great for mapping data into templates. Ember does it and so does many, many other systems.

This illustrates my point. You'd be introducing a second language and a large framework with lots of other unrelated stuff -- which is completely unnecessary when you have a language builtin which is perfectly adequate to the task.

Yes, yes, I know, separating data from code, filters, escape sanitization, there are a lot of good reasons to use templates. If you're a developer just starting out in web design who is creating a very simple project, string concatenation will let you get up and running without the extra complexity.

Of course when your project gets big enough, you'll start to try to modularize things, and then when someone spends 5 minutes explaining templates to the idea, you can immediately see why you want them, because at that point they'll actually reduce the complexity of your project.

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