Greg Donald wrote:
On 4/30/07, Richard Davey <rich@xxxxxxxxxxxxx> wrote:
I'm not dissing heredoc syntax, it has its uses (now and again) but it's
far from "clean", especially when embedded deep in classes
Classes? PHP is the absolute worst language to do OO programming in.
If you like OO, move on to ruby or python, you'll be much happier. Or
you can wait around until PHP fully (d)evolves into Java.
Do you write digg headlines as a past-time? They're quite keen on
sensationlist clap like that.
All parts of a heredoc statement do not have to be right justified,
only the closing line.
That'd be the fuck ugly part.
The frowning surely would be at the mixing of logic and presentation,
Sounds like you got MVC-itis. PHP can't really help with that since
it's a templating language.
Actually I've got clean code, common-sense itis. Separating code from
presentation has been taught in comp sci for decades, and has sod all to
do with Web 2.0 / MVC / Ruby / whatever.
I love me some heredoc syntax:
#!/usr/bin/env perl -w
$x = <<END;
hello world!
END
print $x;
It's just as fuck ugly in properly nested, properly strucutred Perl. The
problem isn't the language, it's the way heredoc works.
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php