Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread Morgan L. Owens
hakre wrote: >> Also, currently yield looks very similar to return and I think this >> is a nice thing as it is similar semantically. yield($foo) would >> give it different semantics, imho. > > I love this point a lot. Return is very common and yield is some > kind of return. > I agree also: yiel

Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread Morgan L. Owens
Mike Ford wrote: > > The signposting needn't even be as in-your-face as a generator > keyword (either instead of or in addition to function): I could get > behind a variation such as: > > function f($x, $y) yields { ... yield $z; ... } > > Or even (stretching a bit to re-use an existing keyword!):

Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread hakre
> Also, currently yield looks very similar to return and I think this is > a nice thing as it is similar semantically. yield($foo) would give it > different semantics, imho. I love this point a lot. Return is very common and yield is some kind of return. -- PHP Internals - PHP Runtime Developm

Re: [PHP-DEV] 5.3 status

2012-08-09 Thread Rob Richards
On 8/9/12 12:01 PM, Rasmus Lerdorf wrote: On 08/09/2012 11:31 AM, Lester Caine wrote: Rasmus Lerdorf wrote: On 08/09/2012 11:10 AM, Levi Morrison wrote: On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards wrote: Whats the status of 5.3? I have some changes that need to get into a couple of the x

Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread Nikita Popov
On Thu, Aug 9, 2012 at 5:59 PM, Andrew Faulds wrote: > yield(), so far as the programmer is concerned, might as well be a function. > It isn't, strictly speaking, but like other function calls, it suspends > execution of the function until the called function completes. > > So I don't think this i

Re: [PHP-DEV] 5.3 status

2012-08-09 Thread Rasmus Lerdorf
On 08/09/2012 11:31 AM, Lester Caine wrote: > Rasmus Lerdorf wrote: >> On 08/09/2012 11:10 AM, Levi Morrison wrote: >>> >On Thu, Aug 9, 2012 at 8:51 AM, Rob >>> Richards wrote: >>Whats the status of 5.3? I have some changes that need to get into a couple >>of the xml based extension

Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread Andrew Faulds
On 09/08/12 16:58, Nikita Popov wrote: On Wed, Aug 8, 2012 at 10:55 PM, Andrew Faulds wrote: Hmm. This is just a quick thought: Considering the yield syntax will vary about needing () round it, why not make it a "fake" function (language construct). This way it's consistent: yield(), yield($v

Re: [PHP-DEV] Generators in PHP

2012-08-09 Thread Nikita Popov
On Wed, Aug 8, 2012 at 10:55 PM, Andrew Faulds wrote: > Hmm. This is just a quick thought: > > Considering the yield syntax will vary about needing () round it, why not > make it a "fake" function (language construct). > > This way it's consistent: yield(), yield($v), yield($k => $v), $a = yield()

Re: [PHP-DEV] 5.3 status

2012-08-09 Thread Lester Caine
Rasmus Lerdorf wrote: On 08/09/2012 11:10 AM, Levi Morrison wrote: >On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards wrote: >>Whats the status of 5.3? I have some changes that need to get into a couple >>of the xml based extensions in order for them to work with the next libxml2 >>release next mon

Re: [PHP-DEV] 5.3 status

2012-08-09 Thread Rasmus Lerdorf
On 08/09/2012 11:10 AM, Levi Morrison wrote: > On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards wrote: >> Whats the status of 5.3? I have some changes that need to get into a couple >> of the xml based extensions in order for them to work with the next libxml2 >> release next month. Should I be puttin

Re: [PHP-DEV] 5.3 status

2012-08-09 Thread Levi Morrison
On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards wrote: > Whats the status of 5.3? I have some changes that need to get into a couple > of the xml based extensions in order for them to work with the next libxml2 > release next month. Should I be putting these into 5.3 as well? > > Rob By no means am

[PHP-DEV] 5.3 status

2012-08-09 Thread Rob Richards
Whats the status of 5.3? I have some changes that need to get into a couple of the xml based extensions in order for them to work with the next libxml2 release next month. Should I be putting these into 5.3 as well? Rob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vi

RE: [PHP-DEV] Re: Generators in PHP

2012-08-09 Thread Ford, Mike
> -Original Message- > From: Andrew Faulds [mailto:a...@ajf.me] > Sent: 25 July 2012 18:03 [...] > Fact: Adding a new name for a special kind of function as a syntax > construct is going to cost (possibly unnecessary) time and energy, > because now you have functions, and weird things tha

Re: [PHP-DEV] Error handling brainstorming

2012-08-09 Thread Ralf Lang
> I know PHP's model is all messed up, but no one here, I believe, is > asking about putting non-error log messages in Exceptions. IO failure is > an exception. > > If your IO operation fails, you can't just log it and plow forward > blissfully without handling the problem. > > Stan > Exception