Re: PHP as a template language

From: Date: Fri, 06 Apr 2012 21:39:10 +0000
Subject: Re: PHP as a template language
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

Am 06.04.2012 23:30, schrieb Tom Boutell:
> Knock it off with the ad-hominem attacks please. 

what do you expect by propose work for many people

> It's not "change for  the sake of change" to propose that PHP move on from 
> needing <?php at the stop of every class file

is it so hard  to write

> (and breaking mysteriously in weird
> subtle ways if it's missing, due to unneeded whitespace being output)

why are you making this whitespaces?
fix your editor or get an IDE removing them at save

> and recognize that it's a modern language in which you don't mix
> unparsed HTML with source code.

you are not in the position to dictate how people are working

there are differences between projects, classes and
rapid-development and thousands of good reasons
using <input type="text" value="<?=$myvar?> forever
while you will not do this in many other projects
and lcass files

> Especially since I suggested offering
> this feature when an alternate file extension is used, to make bc
> possible. Your attitude discourages participation.

but you are not realizing that extensuions are meaningless
in the real world - you can configure httpd to parse .wtf
with PHP

BTW: you do not need to use reply-all, one msg to the list is enough

> On Fri, Apr 6, 2012 at 5:25 PM, Reindl Harald <[email protected]> wrote:
>> what exactly is your problem?
>> having solution searching problem?
>>
>> what are people like you try to achieve?
>> what would make you happy in breaking BC?
>> what would you make happy generate lot of work for others?
>> what would be better for anybody?
>>
>> change for the sake of the change is blindly stupid
>>
>> Am 06.04.2012 23:20, schrieb Tom Boutell:
>>> To tell the truth I'd be more excited by a proposal to kill <?php
>>> entirely, or more realistically, to support an alternate file
>>> extension that doesn't need it. That would be an interesting option
>>> for those who want to put "dribs and drabs of PHP sprinkled in HTML"
>>> completely behind them.
>>>
>>> On Fri, Apr 6, 2012 at 5:19 PM, Tom Boutell <[email protected]> wrote:
>>>> I have to agree with that. Also: does PHP need to be a templating
>>>> language anymore, given excellent templating language implementations
>>>> in PHP, like Twig?
>>>>
>>>> On Fri, Apr 6, 2012 at 3:05 PM, John Crenshaw <[email protected]>
>>>> wrote:
>>>>>> -----Original Message-----
>>>>>> From: Sébatien Durand [mailto:[email protected]]
>>>>>> Sent: Thursday, April 05, 2012 10:55 PM
>>>>>> To: [email protected]
>>>>>> Subject: [PHP-DEV] PHP as a template language
>>>>>>
>>>>>> IMHO, PHP is a great template language. This is what makes it so simple and
>>>>>> powerful, compared to other web languages.
>>>>>>
>>>>>> So far, we have "<?php", "<?=" and various legacy
>>>>>> syntaxes like "<?".
>>>>>>
>>>>>> A suggestion : deprecate these old tags and replace them with a more
>>>>>> elegant and a shorter implementation.
>>>>>>
>>>>>> For example : "<%" and "<%=" or "{%"
>>>>>> and "{{" ?
>>>>>>
>>>>>> What do you think, guys ?
>>>>>
>>>>> Honestly this is the wrong question. PHP as a template language has much larger
>>>>> problems than this. The difference between <?php echo and <?= is 7 characters and entirely
>>>>> cosmetic. The difference relative to <?php echo htmlentities(..., ENT_QUOTES | ENT_HTML5,
>>>>> 'UTF-8'); ?> however is 56 characters, security, and encoding bugs.
>>>>>
>>>>> Proper handling of output escaping is standard in modern template languages.
>>>>> The question shouldn't be "should we add a cooler short tag?". The question should be
>>>>> "What needs to be done to make PHP an industry leader in template languages again?".
>>>>>
>>>>> My two cents,
>>>>>
>>>>> John Crenshaw
>>>>> Priacta, Inc.
>>>>>
>>>>> --
>>>>> PHP Internals - PHP Runtime Development Mailing List
>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Tom Boutell
>>>> P'unk Avenue
>>>> 215 755 1330
>>>> punkave.com
>>>> window.punkave.com
>>>
>>>
>>>
>>
>> --
>>
>> Mit besten Grüßen, Reindl Harald
>> the lounge interactive design GmbH
>> A-1060 Vienna, Hofmühlgasse 17
>> CTO / software-development / cms-solutions
>> p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
>> icq: 154546673, http://www.thelounge.net/
>>
>> http://www.thelounge.net/signature.asc.what.htm
>>
> 
> 
> 

-- 

Mit besten Grüßen, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm



Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc

Thread (23 messages)

« previous php.internals (#59376) next »