Hi Kevin, Kevin Bradwick wrote: > Too many times have I seen developers throwing Exceptions when what they > really needed was something that gave it context like > InvalidArgumentException or RuntimeException. > > Yes, I agree this is something to tackle at code review (and I do) but > I feel PHP doesn't help the situation by making it an instantiatable class.
In general I don't believe making a language be harder to use is the correct solution for programmers doing things you don't like. Designing a language should be focussed on enabling people to write good applications, rather than trying to force a baseline of adequacy. In particular for this case: * Bad programmers would just switch to using another 'default' Exception such as ErrorExcepton. * Good programmers who usually use a specfic exception, but in some scenario want to use an \Exception sensible reasons would just be inconvenienced. So to me, it seems this would only have downsides with no real upside. > Is it worth me pursing the RFC with full > details of the idea or am I on my own with this one? If you did want to proceed with it, I think you would need to address how much BC break it would cause, and why it would be worth it. cheers Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php