Re: [RFC] Supports 'finally' keyword for PHP exceptions

From: Date: Tue, 24 Jul 2012 14:44:21 +0000
Subject: Re: [RFC] Supports 'finally' keyword for PHP exceptions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-61687@lists.php.net to get a copy of this message
On Tue, 2012-07-24 at 10:37 -0400, Anthony Ferrara wrote: > > If you went by "possible", half the proposals for the language > wouldn't be accepted (password hashing, generators, goto, Class name > to scalar resolution, T_AS for closures, type hints, call-time > dereferencing, traits, classes, etc). All of that behavior is possible > without the language sugar that they bring. The main drive for adding > them is that it makes a developers life a lot easier. Rather than > dealing with yet another level of abstraction to add an object, adding > a simple finally clause would make implementing that sort of cleanup > FAR easier. That's why I asked for cases where this language construct is needed. I, from my personal, limited, experience don't have that many needs for this feature. I however see that it makes try/catch blocks and stack frames more expensive (both in CPU time and memory) and the language more complex. Te best argument I saw in this discussion for adding it was "it's possible and I want it". This I don't see as enough reason. johannes

« previous php.internals (#61687) next »