Re: Which way is better?
| From: | Peter Schoenster | Date: | Fri, 09 May 2003 04:07:51 +0000 |
| Subject: | Re: Which way is better? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146967@lists.php.net to get a copy of this message | ||
On Thu, 2003-05-08 at 19:59, Justin French wrote:
> on 09/05/03 12:33 PM, Greg Donald (destiney@destiney.com) wrote:
>
> > I'd use heredoc syntax:
>
> Which proves my point -- it's all about preference. I personally dislike
> heredocs, because of the sctrict nature of how the last line must not be
> indented, etc etc.
and for short scripts I perfer heredoc but anything else goes through
smarty.php.net
Perl has a nice feature where you can choose your delimiter
print q| anything but a pipe unless escaped but when do you use them,
this string is not interpolated, like a single quote|;
print qq|same but will be interpolated|;
and of course for some reason there are people in Perl who don't like
that but escaping things drives me nuts.
If you've been doing web app work for awhile you'll realize the one true
rule is everything will change and will your code be easy to change or
not? Will even you be able to read it later? Your boss will not want to
do a re-write. I always write for ease of evolution, if writing for
speed write closer to the machine other than the obvious, imho.
Peter