On Wed, Feb 20, 2002 at 04:18:44PM +0000, John P. Looney wrote:
> Well, it's an advantage over Perl in that it's not crap[0]. :-P
OK - you, me and the edged weapons when ?[1]
> PHP's idea of OO is a joke. I've been badly bitten by it's "define a
> class, and then I'll let you assign $class->anything whenever you want".
>> The concept of typechecking has been around years. Bah. Stuff like:
>> class host {
> var $name;
> var $host_ip;
> var $status;
> }
>> and later, you do;
>> $newhost= new host;
>> $host->name "eric";
> $host->ip "192.3.2.3";
> $host->status="down";
>> and later in your code, you do:
>> $host->statu="up";
>> You won't find that bug unless you know that status isn't "down". Nasty.
> You would expect it at least to throw a warning.
Oh jeez Louise - isn't that just wonderful. I'm under a certain amount of
pressure to learn PHP (I just yesterday debugged my first PHP program on a
production system. So what, says you ? Well, I'd never written a PHP program
before (apart from <?phpinfo()?> just to see the status of an apache
installation) so it speaks volumes for how easy it is to use when you've a
background in a few other languages (not Cobol, thank God).
However, that automagic variable instantiation is a total piece of crap. I
was astonished when PHP 4 came out that it hadn't inherited something like
"use strict" from Perl. Another cutie I saw in PHP recently was where a
working piece of code in PHP 4.wx stopped working in 4.yz (I can't remember
the exact values of wx and yz, except that wx < yz). It was along the lines of
if (a && b && c) {
# forgive my PHP syntax - a, b, & c were a mix of variables & expressions
and the fix was to rewrite it as
if (a) {
if (b & c) {
Aargh !
The guy who fixed it uses PHP quite a bit and he just regarded it as a PHP
thing (this, mind you, is the same person who said, when I complained that
Word on MacOS wouldn't save a file, complaining that the disk was full [it
had > 1G free], "Yeah, that's a known Word bug" - as you can guess, he's a
more tolerant software user than am I. He wants me to use MS Entourage on OS
X as my email client and finds my "Over my cold dead body" response hard to
understand.
Niall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!