On Fri, Apr 13, 2012 at 1:02 PM, Matthew Weier O'Phinney <
weierophin...@php.net> wrote:

> On 2012-04-13, Kris Craig <kris.cr...@gmail.com> wrote:
> > --f46d04447f47ae95ec04bd949e5f
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > On Fri, Apr 13, 2012 at 12:12 PM, John Crenshaw <
> johncrens...@priacta.com> wrote:
> >
> > > > >
> > > > > On top of this, there's an argument that you're not addressing:
> most
> > > > > template engines in PHP either directly consume PHP template
> files...
> > > > > or "compile" templates into... PHP template files. As such, sooner
> or
> > > > > later, you'll have a class that includes a PHP template file, and
> > > > > that's where things break for me in this proposal.
> > > > >
> > > >
> > > > They don't break because nobody in their right mind would ever try to
> > > > include a .phpp file in a framework like that.  If its stack is so
> > > entangled,
> > > > the very notion of a pure PHP stack is just incompatible.  So your
> best
> > > bet
> > > > on a framework like that would be to stick with .php.
> > >
> > > Um, so if you aren't using any form of template engine whatsoever, what
> > > are you proposing? You're saying we should all go back to the good ol'
> C
> > > days of trying to put together valid markup using string
> concatenation? (Or
> > > worse, manipulation of DOM classes?) No thanks. IMO this is a bit like
> > > blowing up London to stop a jaywalker.
> > >
> >
> > That's a logical fallacy; i.e. your contention relies on the premise
> that,
> > if this doesn't work with every single framework known to exist, then it
> > doesn't work with any template engine whatsoever.  That's just patently
> > ridiculous and could not be further from the truth.
>
> Then point to ONE widely used, OSS templating engine or MVC framework
> that will be able to operate as pure PHP. (My mustache library does not
> count.)
>
> I'll give you time to look for one.
>
> Hint: I don't think you'll find any.
>

Why would I want to prove a point that I was never trying to make in the
first place?

I've never contended that there are frameworks that are 100% pure PHP
code.  That's not a requirement for .phpp anyway.  So I'm not sure why
you're introducing that idea all of a sudden.


>
> Most PHP template engines compile templates to HTML with embedded PHP.
> This does NOT mean that including such a PHP file immediately spits out
> output -- on the contrary: every PHP templating engine I've seen by
> default will use output buffering to allow capturing the output to a
> variable, which you _later_ spit out.
>

See above.


>
> This is one reason I'm very uncertain about your assertion that
> including an embedded PHP file taints the class including it, as well as
> any up the stack. The code itself is never really operating in "mixed"
> or "embed" mode -- only the template file itself is. If you insist on
> the tainting aspect, I honestly do not see this proposal gaining ground;
> few if any exising frameworks or template engines will gain anything by
> it, much less be able to take advantage of it, and the work necessary to
> make it possible makes it undesirable, except as an achievement ("look!
> I did it!").
>
> Finally, you're constantly dismissing the arguments that specifying a
> specific suffix is a bad idea -- but without making a reasonable
> argument as to why suffixes are okay.


That's false.  Please refer to my previous messages from today.  I
explained in detail why a filename extension is preferable to new
keywords.  Rather than forcing me to repeat myself, please read what I've
already posted on the matter.


> I personally write a lot of CLI
> scripts in PHP -- and typically do not give them extensions. Under your
> proposal, even those these do not operate in embed mode, because they do
> not have the "blessed" extension, they cannot omit the <?php tag. This
> is limiting, and goes against the idea of portability.
>
> I'm not going to go as far as John and claim it's an attack on existing
> users or anything -- but I will argue that you're ignoring very, very
> common use cases and patterns used in PHP, and over-estimating how
> likely people will want to use the feature as proposed knowing the
> limitations.
>

I think you're the one who is ignoring what's being said.  I offered a
compromise solution that addresses your concerns and neither of you have
even acknowledged it, let alone responded to it.  If you're not willing to
actually read my posts and look for common ground, then there's no reason
for me to say anything further.


>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
> PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to