"Michael Walter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Another possibility, possibly more concise, would be to introduce a > "scoped" keyword (or similar) in the spirit of "global": > > scoped $foo; > > might make $foo's destructor be called at the end of the current scope > (whether left by a return statement or by an exception). > > Note that this only solves one part of the problem which could be > summarized as "resource management". I'm not sure about generated code - > did someone already post an example where goto might be useful in that > case or did I miss that one?
Considering that some don't accept exceptions to be a valid alternative to gotos, I don't think they'll accept a clearly OOP solution. And yes, I'm also still waiting for a code-generation example, but I guess we'll just assume that gotos are useful there (I use JavaCC, a Java-based top-down generator, so yes there's a lot of recursion but it looks pretty clean to me). David Chen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php