RE: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine

From: Date: Mon, 09 Dec 2013 15:58:03 +0000
Subject: RE: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-70553@lists.php.net to get a copy of this message
> > OK, got you. Not using exceptions in the engine was also a design > > decision (so that we don't force OO concepts on non-OO people) - need > > to think if it still makes sense and get back to the vote. > > > > Thanks! > > > > Zeev > > I think it is fair to say there is a big difference between "forcing OO concepts > on non-OO people" and which is what is being proposed > here: "this is an object which you can use if you'd like to find out what is > happening with this exception." > > No PHP developer is going to get away with not using any objects ever > regardless of their preferred design approach, so offering them exception > objects is not going to frighten anyone off. While I disagree that all PHP developers would have to use objects (you can live a full healthy procedural life in PHP) - regardless, exceptions and their jargon is a much more advanced OO concept than just using plain objects. Throwing, catching, propagation rules, try/catch/finally - those all come hand in hand with exceptions. We've made a conscious decision not to force this on users back when we introduced exceptions, and keep the engine use errors only (which can be converted to exceptions easily enough using error handlers). Note that I think that this part is debatable - I'm a lot more worried on the feedback Dmitry provided earlier today (although I admit I'm not crazy of just keeping things the way they, and letting those who are interested in exceptions convert errors to exceptions on their own). Zeev

« previous php.internals (#70553) next »