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

PHP is a templating languages designed to be so inadequate that you have to implement other templating languages in it.

https://news.ycombinator.com/item?id=32961202

>PHP was already a templating language, but somebody got it in their head that there should be an iron-clad separation between designers and programmers, and that PHP gave designers too much power and confused them, and that their incompetent untrustworthy designers who refused to learn anything about programming deserved something even "simpler" than PHP, so they came up with Smarty.

>Then over time the realized that their designers were powerless, so their programmers would have to learn TWO languages so they could wade into the Smarty templates to make them actually work with all the extra code they had to write because Smarty was so crippled, so they nickle-and-dimed more and more incoherent programming language elements into Smarty, making it EVEN HARDER to use and more complicated and less consistent than PHP, yet nowhere near as powerful.






Modern PHP is not a templating language. It can be, much like many other languages can be, but it's not how it is used. Most other languages also implement their own templating languages. Have you seen modern PHP ... I don't know, sometime in the last 10 or so years, or is this just another circle jerk of hating on something you have little clue about?

Now if you see that as a bad thing, separating business logic and presentation, and sandboxing presentation so it has no larger access to the system, then I'm afraid you're just not a good programmer.


> Modern PHP is not a templating language. It can be

Modern PHP has the same capabilities as PHP 5 had, and more. There was nothing fundamental removed from the language that keeps it from being used as it was in PHP 5.


It didn't seem like they were suggesting otherwise?

Not sure we read the same thing?

Object-oriented PHP, i.e. PHP 5, was released in 2004. PHP 4 was killed in 2008.

Separating out templates was already something one used to do back when Laravel added Blade back in 2010-2011 sometime, in one of the first iterations of the framework. It's not like they experienced pushback because of Blade.




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

Search: