Re: require_once vs. no require_once - please read, critical information
| From: | Pádraic Brady | Date: | Mon, 24 Sep 2007 11:12:56 +0000 |
| Subject: | Re: require_once vs. no require_once - please read, critical information | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-48154@lists.php.net to get a copy of this message | ||
I'd like to thank Greg for the analysis and benchmarks - it makes things that were seeming very
vague, or even oxymoronic relatively straight forward. I have to now admit being convinced. The
benchmarks, examples and explanations address my previous concerns. I may have zero packages right
now (getting there now ;) after returning from vacation) but I'd move my support to the +1
position.
I would only ask that PEAR2 documentation make all this as simple and straight forward as possible.
As we've seen already, the switch does evoke doubtful reactions from developers who will point
at everyone else taking the more generally accepted route. Greg's email should be standard
reading...
Cool
Paddy
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com
OpenID Europe Foundation Member-Subscriber
----- Original Message ----
From: Lukas Kahwe Smith <mls@pooteeweet.org>
To: Gregory Beaver <greg@chiaraquartet.net>
Cc: PEAR Announce <pear-dev@lists.php.net>
Sent: Monday, September 24, 2007 11:14:29 AM
Subject: Re: [PEAR-DEV] require_once vs. no require_once - please read, critical information
Gregory Beaver wrote:
> Comparing the two ways, I can draw three conclusions:
>
> 1) the number of steps required to locate HTML_Common is the same number
> (5) between require_once/autoload
> 2) in require_once, a user without knowledge that HTML/Common.php =
> HTML_Common class is likely to be stuck
> 3) with autoload, a user who does not use autoload is likely to find the
> missing dependency, but unlikely to understand how to enable it, and
> even less likely to be able to understand anything about programming.
It should also be mentioned that using __autoload() enables us to
provide a helper method that provides additional information. This is
what I was trying to preach with the flexibility mantra. We can provide
a nice helper with error messages that clearly tell you the next steps.
The user can send himself an SMS. The user can create the class on the
fly and handle things even more gracefully if they so choose. Heck, they
could even install the page and then move on at runtime ;)
regards,
Lukas
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/