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

I think his main argument is why are we using a text based templating when we can go up one step further and have language based templating.

like why have:

{"foo": "<%= bar %>"}

when you could just have

{"foo": bar}

the problem with text based templating is the templating language has to make a decision about escaping and it is sometimes the wrong one. for example rebar used an erlang haml [at some point... maybe they fixed it :)] which meant it escaped html special characters by default. but this makes almost zero sense when generating erlang configuration files.

i guess the reason that it is like this is because it is just easy and for most YAML/JSON/etc configuration files it is not a problem because you are basically doing static substitution or 'dynamic' substitution but with a safe range of characters. so the reason things are 'bad' is because the current solution works for 99% of the use cases and no-one wants to spend time fixing it when they could spend that time fixing a real problem. heh :/




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

Search: