3 ms·
>PHP was meant to be a simple templating language for HTML, and it failed miserably at that I would argue that it was too good at that, instead. It was so goo
by wccrawford 8y ago
>PHP was meant to be a simple templating language for HTML, and it failed miserably at that
I would argue that it was too good at that, instead. It was so good at being a real language that people didn't just use it as a templating language and it grew way, way bigger than initially intended.
When I see PHP templating libraries, they are all focused on restricting the programmer from doing supposedly stupid things. They try to prevent logic from leaking into the templates and utterly fail at it.
- krapp 8y agoThe problem is, the templating part is what PHP is bad at. That the programmer has to manually escape everything because PHP doesn't actually know what HTML is, or else find a templating framework that does it for them (like any other web-facing language), kind of demonstrates how badly PHP fails at its "one job". PHP has a lot going for it, but HTML templating isn't one of its strong points. On the upside, though, package management is sane and distributed by default, and left-pad wouldn't happen in PHP-land.