Re: [RFC] New operator for context-dependent escaping

From: Date: Sun, 24 Jul 2016 13:51:31 +0000
Subject: Re: [RFC] New operator for context-dependent escaping
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-94675@lists.php.net to get a copy of this message
On 23/07/2016 20:23, Michael Morris wrote:
PHP was a template engine at inception. [...] something has gone awry when people are writing template engines inside of a template engine.
At its inception, PHP was a handful of scripts including access logging and a guestbook form. You can take a look here: https://github.com/phplang/php-past/tree/0246ebc1bf5ae2e945d28961f975717774e6d287 Yes, at a stretch, it was a rudimentary template engine; but in a sense, so is any programming language that has variables, output, and some form of string interpolation. Smarty was created in 2000, and its first ever README makes clear reference to older templating engines: https://github.com/smarty-php/smarty/tree/497badbe646f73703b7130609e9ffe2cbd23fa42 When exactly did things go awry? In other words, that ship has sailed. The idea that everything that PHP has ever had a mediocre version of built in, should be forever embedded in and maintained by the default distribution, is absurd. PHP today is a programming language, and applications and libraries can be and are written in that programming language. Trying to build default functionality that would compete with a modern templating engine like Twig would be a lot of effort, and to what end? A kind of language nationalism, that "PHP does it all"? Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#94675) next »