☞ | ![]() ![]() |
60 |
Had I been designing this, I would have eliminated:
99 if ( $@ ) { 100 $item->observer_error( 101 "Failed to send observation from '$item' to '$o': $@" );
What's this for?
What if one of the observers throws an exception that the caller wanted to catch?
All this can accomplish is to screw that up
If the caller wants to catch some exception, they could just use eval themselves
Most software is full of features like this
The features serve no useful purpose
They do something that could just as easily be done by the user
But they do it in a way that nobody could possibly want
And they complicate the code, the design, the usability
How to make software better:
Cut this stuff out
☞ | ![]() |
☞ |