PostgreSQL Slammed by PHP Creator
leifbk writes "'The Web is broken and it's all your fault' says Rasmus Lerdorf, the creator of PHP. He talks about not trusting user input, and the brokenness of IE, which is all fine. Then he makes a statement about MySQL vs PostgreSQL: 'If you can fit your problem into what MySQL can handle it's very fast,' Lerdorf said. 'You can gain quite a bit of performance.' For the items that MySQL doesn't handle as well as PostgreSQL, Lerdorf noted that some features can be emulated in PHP itself, and you still end up with a net performance boost. Naturally, the PostgreSQL community is rather unimpressed. One of the more amusing replies: 'I wasn't able to find anything the article worth discussing. If you give up A, C, I, and D, of course you get better performance- just like you can get better performance from a wheel-less Yugo if you slide it down a luge track.'"
This is why I love flame wars right here:
"of course you get better performance- just like you can get better performance from a wheel-less Yugo if you slide it down a luge track."
-nB
whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
It's obvious just whose bastard son PHP is .....
PHP takes care to keep things consistent, which is important for easing beginners in gently; Perl is not afraid to eschew consistency where it makes sense to do so. For instance, PHP's regex matching and substitution functions, derived from Perl, are incredibly tedious. In Perl, you're likely to be doing a lot of regex matches: the syntax is such that you just drop 'em in, and let the parser worry about them. No other language I've encountered lets you do that. Even in Python you have to jump through hoops to do what Perl makes simple, and Java seems to go all out to discourage you from bothering with regular expressions.
Some things about Perl are a bit finicky, especially where they involve getting close to the metal. Take for instance the four-argument select function (the one for seeing which file descriptors are ready to present data, expecting data or have just done something they shouldn't, not the one you use for selecting a filehandle for output.) It expects its arguments to be bitmasks created with pack "i", $bits -- you can't just use, say, integers and have them automagically turned into bitmasks. While that sounds a bit un-Perl-like, you have to remember that there are 8999 integers represented by 4-byte strings (and so indistinguible from 32-bit bitmasks). What you really should do is create a wrapper function around select, which takes its parameters (and returns its results) in a more convenient form for the program you are writing.
Je fume. Tu fumes. Nous fûmes!