Re: Exceptions and Errors
| From: | Marcus Boerger | Date: | Thu, 15 Apr 2004 06:20:25 +0000 |
| Subject: | Re: Exceptions and Errors | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9165@lists.php.net to get a copy of this message | ||
Hello Sterling,
Thursday, April 15, 2004, 7:55:17 AM, you wrote:
> On Apr 14, 2004, at 10:36 PM, Thies C.Arntzen wrote:
>> if ctors are the only place that *cannot* life without exceptions it
>> would be well worth *fixing* (yes, i said fix), as adding
>> "understanding exceptions" to the list of pre-requisites for
>> learning/using php would just be a poor decision looking at what made
>> php as popular as it is today.
> the solution there would not be to "fix" ctor, but instead to use a
> factory, and have constructors without logic. the other case where one
> can't live without exceptions is when using overloads (solution: don't
> use overloads when you care about signaling error conditions).
> couldn't agree more btw, i think exceptions are cool, and certainly
> have their usages, but after reading the comments on this thread, i
> think we are about to hand out cocaine to children. hopefully one hit
> is enough ;-)
> either way its rc2, not much can be done now...
When i started the OO model of SQLite i explicitly choose ctors with logic
over the factory attempt because the latter prevents inheritance from the
beginning at least in the case of overloaded php objects.
regards
marcus