Re: heredoc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12/18/2006 10:14 PM, clr wrote:
Please can someone advise me on heredoc and its shortcommings,

I am designing a complex site and elected to use DIV's as opposed to frames.
Heredoc seems to be ideal in that I can do all processing first and then layout with relative ease.

I was wondering if it was acceptable to use and maintain going forward as i have read on a few mailing archives
that this is a "cheat" and lazy and to be depreciated??


Yikes! Then a scoundrel I must be indeed. I love using heredoc, primarily because it lets me compose blocks of pure output text without interrupting it with control structures, nested quotes, and concatenation syntax, even when it contains nested variables. It helps me to separate logic from markup, something that benefits my code (if not my character!).

I imagine you'll hear from others whose sensibilities are offended by heredoc -- in particular those whose careful indentation it spoils -- so I wanted to make sure you knew that it had an (admittedly cheating and lazy yet) ardent supporter as well.

I don't know whom, in programming, you can cheat other than yourself; I've been suffering under the misapprehension that laziness is a virtue because it teaches efficiency; but I really hadn't heard that heredoc was going to be deprecated. If it is then it will be my loss and the gain of those who earn royalties from the use of quotation marks and periods and who make their living pulling the tangled and bloody fragments of logic and markup from the wreckage of their collision.

Regards,
Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux