On Sunday, July 20, 2003, at 09:44 AM, Marcus BXrger wrote:
Hello everyone,
here is an updated list of things we need to do/discuss before beta 2.
High priority:
- Completely force a derived class now to implement the same amount of
parameters with the same typehints as the inherited one. When it comes
to typehints theory allows to provide same or parent types but that would
be much harder to implement so only allowing the same type is just easier.
We also don't have a way to specify typehints and param amount for functions
declared at c-level. Further more we are not able to specify access type of
a method declared at c-level (static/public/protected/private/final).
Are you talking about just interface implementation here, or general inheritance. If the latter, I'm not a big fan of this.
- Complete work on exceptions and find a solution on when to throw exceptions
and when to use errors.
I still do not see any BC problems with making try/catch blocks to convert
E_WARING, E_NOTICE & E_ERROR to exceptions (assumed the problemntaic E_ERRORS
are changed to E_CORE or such). Why no BC? Simply becuase using try/catch
with old libs and relying on error capturing is an antilogy in itself.
Especially when thinking about the very limited capabilities in handling
errors the old way.
As you know, I'm a big fan of this in th case of E_ERROR, because there really are no BC issues involved. The E_WARNING and E_NOTICE errors are different though, and seem like a serious concern to me. This has been gone over a number of times, but the example that worries me is
try { new_func(); } catch (Exception $e) {}
function new_func() { /* .... do some stuff ...*/ old_func(); /* ... more stuff ... */ }
old_func() has been coded to throw warnings for non critical issues (as informational messages). Broken.
E_NOTICE is even worse, since many folks code does not run clean under E_NOTICE. Now you include a file in your try block somewhere and you get an exception.
Seems icky.
Discuss about adding 'thorws' to a method declaration and a flag for c-level
functions so that the compiler can emit an error when such a method is used
without try/catch.
Huh? Shouldn't it be my choice to put a try/catch block around a function? Why should I be forced to catch ay errors it emits?
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php