Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-18 Thread Nathan
I will +1 this as I have had to deal with some of these struggles, as a suggestion though: "Like the bind(To) methods, a static class cannot be bound (using →call will fail)" I would like to see this function work like Closure::bind()/Closure::bindTo() and give the option for the $newScope option

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-18 Thread Andrea Faulds
On 18 Aug 2014, at 00:40, Levi Morrison wrote: > On Sun, Aug 17, 2014 at 5:13 PM, Stas Malyshev wrote: >> Hi! >> >>> It does, but maybe you missed it. Under the Proposal section: >>> To solve this, we relax the current invariant of scoped closures having to be bound, and add a new p

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Levi Morrison
On Sun, Aug 17, 2014 at 5:13 PM, Stas Malyshev wrote: > Hi! > >> It does, but maybe you missed it. Under the Proposal section: >> >>> To solve this, we relax the current invariant of scoped closures >>> having to be bound, and add a new parameter to bind(To) to produce >>> an unbound, scoped closu

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Stas Malyshev
Hi! > It does, but maybe you missed it. Under the Proposal section: > >> To solve this, we relax the current invariant of scoped closures >> having to be bound, and add a new parameter to bind(To) to produce >> an unbound, scoped closure, like so: Indeed, I missed it - I was looking for bindTo.

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Andrea Faulds
On 17 Aug 2014, at 20:33, Andrea Faulds wrote: > https://wiki.php.net/rfc/closure_apply#vote > > The vote ends 2014-08-17. The Function Referencing as Closures RFC is not yet > being put to a vote. I cancelled the vote as I’ve changed what the RFC does after some discussion. Instead of havin

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Andrea Faulds
On 17 Aug 2014, at 22:36, Levi Morrison wrote: > I have a small clarification question on the RFC: you are adding > another parameter to bindTo which defaults to false, but I didn't > quite understand the reasoning. Can you try explaining that to me in a > different way? I’ll give it a go. Clo

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Stas Malyshev
Hi! > I have a small clarification question on the RFC: you are adding > another parameter to bindTo which defaults to false, but I didn't > quite understand the reasoning. Can you try explaining that to me in a > different way? Interestingly enough, the RFC doesn't even mention this change. --

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Levi Morrison
I have a small clarification question on the RFC: you are adding another parameter to bindTo which defaults to false, but I didn't quite understand the reasoning. Can you try explaining that to me in a different way? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: h

[PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-17 Thread Andrea Faulds
Good evening, I’ve updated the patch to work with phpng, so the Closure::call() RFC has been put to a vote: https://wiki.php.net/rfc/closure_apply#vote The vote ends 2014-08-17. The Function Referencing as Closures RFC is not yet being put to a vote. Thanks! -- Andrea Faulds http://ajf.me/