Hi!

>> While exceptions themselves may not be suitable for a general-purpose
> control structure, they do embody one. It's an early-return mechanism that
> you also see in some of the other control structures mentioned in this
> thread (Python's generators, Common LISP's conditions). Even the "return"

You can do the same generators do using iterators in PHP. You'll have to
store state a bit more explicitly, but otherwise it'd be pretty much the
same, as far as I can see.
However, in general, thinking about more complex flow control structures
in fine. Just there's no reason to get exceptions mixed into it.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to