[Za-pm] Re: Za-pm digest, Vol 1 #15 - 1 msg

Oskar Pearson oskar at qualica.com
Mon May 26 10:05:39 CDT 2003


Hi Dallas

> >1) libraries I write in perl can be used from the command line easily:
> >I can write a library and use it in a cron job and in a web page.
> so can php, i run several cron jobs every hour, all php, with no performance
> loss

Cool - I remember seeing some way of running programs with a command-line
version (this was years back, when I last used it), but it seemed more suited
for debugging than for cron-type-stuff.

> >2) php programmers generally have a poor idea of the seperation between
> >code and interface. They put db queries straight into their table
> >layout code and other such things.
> i have seen many programmers do this, even perl programmers

Oh absolutely - I agree with that. The difference is, however, that
almost all the reference material I've seen and read for php seems
to have examples like this:

 print "<table>\n";
    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
        print "\t<tr>\n";
        foreach ($line as $col_value) {
            print "\t\t<td>$col_value</td>\n";
        }
        print "\t</tr>\n";
    }

(that's from the php manual at http://www.php.net/manual/en/ref.mysql.php)

I think that this leads to a whole bunch of people that program in
the same way, which leads to code that (in general) looks uglier.

Of course, perl easily ends up looking like line noise too, but in
general it's not line-noise-mixed-with-html-code, imho.

These are vast generalisations - perhaps I just like perl too much :)

Oskar
--
Oskar Pearson <oskar at qualica.com>
Qualica Technologies (Pty) Ltd
web: http://www.qualica.com/



More information about the Za-pm mailing list