Hi Marcus Boerger!
On 08/08/05 19:58 you wrote:

>>The point is, that it's senseless to have it throw any exception that
>>can be disabled, when you want to write portable applications. In that
>>case you still have to stick to catch Exception and have no benefit of
>>it throwing anything else, when SPL is enabled.

>>I would pretty much appreciate it having thrown an
>>InvalidArgumentException, but then this should work everywhere.

> If you plan to support PHP builds without SPL then that most likley means
> that you have dropped other built-in default extensions too. Probably
> because of their memory space to reduce loading time. In that case you are
> not up for portability or have made a major mistake already in the
> beginning.

> Anyway there is no argument here. If you go for portable apps in the sense
> that any extension can be diabled then catching plain Exceptions should be
> more than good enough. You cannot expect to have full blown oo support when
> you disable the one oo extension.

That's the point: OO extension. I agree that things like iterators and
stuff belong into SPL, since they're not standard OO features. But
things like predefined exceptions belong into the engine. Especially
those that get thrown by a PHP builtin feauture.

Not to get me wrong, I'm strongly against having extensions itself or
functions throw exceptions, but in the case we currently discuss, we are
dealing with an OO feature of PHP, that should definitly throw it's own
exception. Why else were exceptions invented when not to be used with OO
features?

> As a side note we could probably also move all exception declarations from
> SPL to the engine but then we'd loose the possibility to support builds
> without SPL. At the end of the day i'd even like to drop reflection support
> from the engine and move it to a specialized extensions - again - for
> speed/memory reasons.

Having all exceptions in the engine sounds much overhead. But some well
defined ones that get utilized by PHP OO features would definitly make
sense.

In the end, I have not a real problem with any solution, as long as OO
features start throwing exceptions instead of raising errors. :)

Regards,
Toby
-- 
Tobias Schlitt - Zend Certified Engineer         GPG Key: 0xA6529579
a passion for php                            http://www.schlitt.info
Like to say "thank you"?    -  http://pear.php.net/wishlist.php/toby

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

Reply via email to