Keith Devens .com |
Friday, March 19, 2010 | ![]() |
| This is not The Greatest Song in the World, oh no. This is just a tribute. – Tenacious D | ||
|
| ← Design of my CMS, or Template problem | Rick Santorum is awesome → |

George Schlossnagle wrote:
Adam Vandenberg (http://flangy.com/) wrote:
And according to Randal Schwartz, what Perl "got right" (http://www.stonehenge.com/merlyn/LinuxMag/col44.html) is having all sorts of UNIX C functions dumped right into the default namespace. Bluuuuuh.
George Schlossnagle wrote:
Well, if that is 'right', then PHP's strategy rocks. Just about every library function in any library on your system is in the default namespace. 
Adam Vandenberg (http://flangy.com/) wrote:
Three of the reasons I like Python are "namespaces".
Simon Willison (http://simon.incutio.com/) wrote:
If we're counting bulit in functions, Python only has 71:
len([fn for fn in dir(_builtins_) if fn.islower() and '_' not in fn])
I agree with the above posters. The critical thing missing from PHP (and that Python and Perl do so well) is modules. Python's namespaces truly are a thing of beauty, allowing the Python standard library to include functions for pretty much everything you can think of without resulting in a huge mess of functionality dumped in to the global namespace.
cagrET (http://g0su.net) wrote:
The link does not work:
"Scribblet '1692HYPE' not found"

Keith (http://keithdevens.com/) wrote:
Well, that sucks. I searched Google and it couldn't find another version of that article. That's the last time I link to anything from that site.
Keith (http://keithdevens.com/) wrote:
Actually, it turns out that site isn't meant to be linked to.
Aankhen wrote:
Try this instead: http://tnx.nl/php
Who added the .txt bit?
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.116s.
(Used 8 db queries)
I agree with the premise, but the analysis is flawed.
PHP extensions (which comprise teh vast majority of the 'builtin funcitons', are almost all toggleable at build time. They are equivalent to the 'core' Perl modules that ship as part of a Perl distribution. $dbh->quote() is faulty, since it relies on all the underlying quoting apis in the DBD modules it loads. (Yes, the consistent api and delegator/aggregator model of DBI are really nice - php5 will have pdo).
The consistent naming and consistent argument ordering critiques are spot-on.