On Mon, 2004-02-16 at 08:39, Hans Lellelid wrote:
> will catch *all* exceptions thrown by any libraries I choose to use, 
> etc. Mixing the interface means requiring PHP developers to catch() on 
> the interface everywhere or risk having uncaught exceptions when a 3rd 
> party package they are using decides to throw IException implementing 
> classes instead.  Maybe telling people (developers) to use the 
> IException everywhere is ok, but is not what people are expecting right now.

My biggest motivation for not having an exception class was to prevent
people from having a catch all with exceptions.  Personally, I think
that attitude is what has caused an over use of exceptions (making every
function throw Exception so as to not have to deal with them) as well as
let people use code without understanding exceptions (throwing a catch
all around an API call so they don't have to really handle any
exceptions).  I would like to be able to throw exceptions that must be
caught explicitly to help deter people from just ignoring them.  It
seems however that I am in the vast minority.  I understand the
simplicity argument and think it is appropriate for PHP given it's user
base.  In fact I am now wondering if exceptions aren't a potential trap
that will cause more problems than benefits.  I like that PHP != Java.

So, how about prototype inheritance? (J.K.!)

Regards,
Adam

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to