Re: [VOTE] Generators
| From: | Derick Rethans | Date: | Thu, 30 Aug 2012 08:37:45 +0000 |
| Subject: | Re: [VOTE] Generators | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62595@lists.php.net to get a copy of this message | ||
On Thu, 30 Aug 2012, Yasuo Ohgaki wrote:
> 2012/8/30 Pierre Joye <pierre.php@gmail.com>:
> >
> > On Wed, Aug 29, 2012 at 11:19 PM, Derick Rethans <derick@php.net> wrote:
> >
> >> "ext/spl" - SPL is not *core* language. The generators are. Don't
> >> throw exceptions from core features!
> >
> > I would not have a problem with exceptions here. It is much cleaner
> > than yet another warning.
>
> But we have errorException for errors since PHP 5.1.
> http://jp.php.net/errorException
>
> Are there any technical reasons not to have exception?
That is a different discussion:
http://thread.gmane.org/gmane.comp.php.devel/74941
Right now, language syntax does not throw exceptions, so until we have
*consensus* on error handling/reporting/exceptions, the new yield
keyword with generators should *not* throw exceptions either!
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine