3 ms·
This should have been implemented back in PHP 5.0, when exceptions were first introduced. A try-catch block without finally is only half complete! But it's gre
by kijin 14y ago
This should have been implemented back in PHP 5.0, when exceptions were first introduced. A try-catch block without finally is only half complete!
But it's great to see half-complete features becoming fully complete, even if a few years late.
- TazeTSchnitzel 14y agoThe main argument against it (that keeps coming up on ML) is destructors and resources cleaning up after themselves. Pretty weak argument though.
- deleted 14y ago[deleted]
- ceol 14y agoYes, considering OOP and exceptions are not dependent on each other.
- augusto_hp 14y agoIt is definitely great. Although missed this for quite some years now, it is quite pleasing to see how the language continue to evolve throughout the years :)
- meritt 14y agoYou should talk to Bjarne about leaving it out of C++ :)
- ori_b 14y agoC++ has a finally equivalent in a different form: Every object gets to clean up at the end of the scope as part of it's destructor. If you're not using RAII to manage cleaning up resources at the end of a scope, it's probably a good idea to change your style a bit.
- smsm42 14y agoPHP perfectly can do the same. But I guess people want both.