It was thus said that the Great Joshua Juran once stated: > On Sep 29, 2008, at 7:39 PM, Sean Conner wrote: > > > -spc (Holding back the bile on a whole bunch of PHP hate ... ) > > No, no, by all means bring it forth! :-D
Oh, you mean how modules in PHP applications are installed by modifying tons of existing code? [1] Or how PHP's "lint" function is less functional than real lint? [2] But that's just an example of the poor error reporting in PHP. [3] Then again, PHP breaks code in minor releases, but that's because PHP is the scripting language du jour. [4] Need I even mention it's "dynamic type" handling? [5] And what the hell is a "variable variable" anyway? [6] (don't answer---I know it's PHP's answer to C pointers, but it's a question I don't think anyone wanted answered) Gah! Have I really been bitching about PHP since 2000? [7] But, to get this back to SQL for a bit (plus some more PHP bashing), I just *love* this example of some PHP programmer attempting to make his code more portable between MySQL and PostgreSQL by applying the dynamic nature of PHP to store the name of the function in a variable [8]: $result = $system_query("SELECT * FROM sometable$name"); where $system_query is defined as "mysql_query", but not in source code. No, that would be like, premature optimization or something. No, this is specifed in a *file* that's read on the fly. Only, that *won't work!* Or rather, will only work for a handful of calls. Oh, and *this* is classic. I had yet another PHP application that needed to be "ported" to PostgreSQL, and I actually *found* a release where someone did all the dirty work for me. Well, mostly. [9] We triggered an SQL statement that MySQL liked but PostgreSQL barfed on. There were too many of these to actually fix correctly, so ... well ... I hate to admit this, but I wrote a function to "fix" the SQL query on the fly! [10] Normally, my job isn't quite this horrible. If I'm good, I get to configure OSPF and BGP on our Cisco routers ... > Have you ever tried > functional programming in PHP? No, I try not to program in PHP if I can help it. -spc (Good gravy! Is it really 4:45 am? What the heck am I still doing up?) [1] http://boston.conman.org/2008/09/22.2 [2] http://boston.conman.org/2008/09/17.1 [3] http://boston.conman.org/2005/08/09.1 [4] http://boston.conman.org/2004/11/11.3 [5] http://boston.conman.org/2007/03/10.2 [6] http://boston.conman.org/2005/03/08.2 [7] http://boston.conman.org/2000/03/03.4 [8] http://boston.conman.org/2005/03/25.1 [9] http://boston.conman.org/2007/12/17.1 [10] http://boston.conman.org/2007/12/18.1