Re: Exception misinformation
| From: | David Costa | Date: | Thu, 08 Jul 2004 12:01:03 +0000 |
| Subject: | Re: Exception misinformation | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31745@lists.php.net to get a copy of this message | ||
On Jul 8, 2004, at 12:43 PM, Jan Lehnardt wrote:
Hi, On 7 Jul 2004, at 16:39, David Costa wrote:Of course, but it is also possible to use PHP 5 without using any OO approach forgetting about classes and perhaps stick with the good old functions.... Everything is optional. Funny enough all the PHP 4 procedural developers will have little if no troubles in porting their existing code to PHP 5.That was exactly my point. I just tried to demonstrate that the argument "we should use exceptions with care because PHP 5 users and developers don't know how to catch them" is flawed.There is still the procedural API for SQLite. The OO API is an option, that comes with the exception in the constructor, but still is an option. It is possible to use PHP 5 without knowing anything about exceptions at all.
Just because PHP 5 provides the option of using exceptions, it doesn't mean they are inherent of PHP 5 development.Right Jan, by all means I never said that exceptions are a must but what I try to avoid is the other way around : aka the impossibility to use PEAR_Exception if I want. Once again I am fine if the someone wants to use something else but I don't want to jeopardize the importance of using and learning the new object model just because many developers are not sufficiently familiar with PHP 5. (and not comfortable with exceptions). It would be a mistake of biblical proportion to cut out exceptions from PEAR in favor of a PHP 4 error handling ported to PHP 5. Incidentally some of the people against Exceptions (or not too happy about them) are also not too happy about PHP 5 packages now ;) I do have a great deal of respect for Lukas and other senior members who where kind enough to voice their perplexity. All I am proposing is to keep our options open till we have a PHP 5 stable release (very soon) and more experience with PHP 5 in production environments. Regards David Costa