RE: [PHP-DEV] Class constructor behaviour
> De : Andrea Faulds [mailto:[email protected]]
>
> I don’t really agree here. For some reason we have this tradition of not using
> exceptions for “procedural” stuff. That sort of makes sense for functions, but
> classes are “OOP” and therefore I don’t see a good reason why they
> shouldn’t throw exceptions. Exceptions and OOP (and namespaces, even)
> should not be the domain of userland exclusively, they are also the domain
> of internals/core. If you really hate exceptions, I’d say you should just use
> one of those ridiculous “procedural” alternative functions (that are just
> methods in disguise) that we went to the bother of adding.
I agree. I just remembered that, in in the past, every proposal which included exceptions in the
core were discarded. I also would prefer exceptions to this old error system. If minds (or people)
have changed, that's a very good thing.
François
Thread (19 messages)