Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-10-03 Thread Sara Golemon
On Fri, Oct 2, 2015 at 12:33 PM, Björn Larsson wrote: > Leaves the options, >==, <== or >>=, <<=. But I don't like the > last ones. One might also consider extending the spaceship > operator to <==> for strict comparison. > Shift-left assign: >>= Shift-right assign: <<= So no on both of those. Bu

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-10-02 Thread Björn Larsson
Den 2015-10-02 kl. 18:50, skrev Sara Golemon: On Mon, Sep 28, 2015 at 2:29 PM, Björn Larsson wrote: ... or if someday in the future comparison operator without type juggling is needed. You just blew my mind. Trying to imagine where strict greater-than-or-equal would be used, and more to the

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-10-02 Thread Sara Golemon
On Mon, Sep 28, 2015 at 2:29 PM, Björn Larsson wrote: > ... or if someday in the future comparison operator > without type juggling is needed. > You just blew my mind. Trying to imagine where strict greater-than-or-equal would be used, and more to the point: What you'd make strict grater than loo

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-10-01 Thread Pascal MARTIN, AFUP
Le 22/09/2015 03:59, Bob Weinand a écrit : Hey, or straight ahead to the vote: https://wiki.php.net/rfc/short_closures#vote Thanks, Bob Hi, After discussing this with other people at AFUP, we would be (a large majority of us) -1 on this RFC. Basically, we feel that: * This could lead t

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-28 Thread Björn Larsson
Den 2015-09-26 kl. 09:18, skrev Pavel Kouřil: On Tue, Sep 22, 2015 at 3:59 AM, Bob Weinand wrote: Hey, Thanks for all your feedback in the discussion thread! So, before I start the vote, just two quick notes: I've added two notes about the statement syntax and the single variable use. Though

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-28 Thread Arne Blankerts
Hi, On Sa, 2015-09-26 at 10:10 +0200, Pavel Kouřil wrote: > On Sat, Sep 26, 2015 at 9:57 AM, Stanislav Malyshev > wrote: > > Hi! > > > >> The biggest issues seem to be > >> - ~> operator instead of ==> > >> - missing type hints > >> - auto imports > > > > > Seems you are right it's not clear aft

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-26 Thread Pavel Kouřil
On Sat, Sep 26, 2015 at 9:57 AM, Stanislav Malyshev wrote: > Hi! > >> since the RFC doesn't look like it will pass, I have a question about >> RFC process - will you be able to "fix" the RFC and submit it for vote >> again with targeting PHP 7.1? > > Yes, but see: > https://wiki.php.net/rfc/voting

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-26 Thread Stanislav Malyshev
Hi! > since the RFC doesn't look like it will pass, I have a question about > RFC process - will you be able to "fix" the RFC and submit it for vote > again with targeting PHP 7.1? Yes, but see: https://wiki.php.net/rfc/voting#resurrecting_rejected_proposals So, to make another try, the RFC need

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-26 Thread Pavel Kouřil
On Tue, Sep 22, 2015 at 3:59 AM, Bob Weinand wrote: > Hey, > > Thanks for all your feedback in the discussion thread! > > So, before I start the vote, just two quick notes: > I've added two notes about the statement syntax and the single variable use. > Though a few people complained, I'm not swit

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-26 Thread Pavel Kouřil
On Fri, Sep 25, 2015 at 9:44 PM, Bishop Bettini wrote: > Hi, > > On Mon, Sep 21, 2015 at 9:59 PM, Bob Weinand wrote: > >> So, before I start the vote, just two quick notes: >> I've added two notes about the statement syntax and the single variable >> use. >> Though a few people complained, I'm no

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-25 Thread Bishop Bettini
Hi, On Mon, Sep 21, 2015 at 9:59 PM, Bob Weinand wrote: > So, before I start the vote, just two quick notes: > I've added two notes about the statement syntax and the single variable > use. > Though a few people complained, I'm not switching to the ==> operator, as > I noticed many people expect

RE: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-25 Thread Anatol Belski
Hi, > -Original Message- > From: Bob Weinand [mailto:bobw...@hotmail.com] > Sent: Tuesday, September 22, 2015 4:00 AM > To: PHP internals > Subject: [PHP-DEV] [RFC] [VOTE] Short Closures > > Hey, > > Thanks for all your feedback in the discussion thread!

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-23 Thread Tony Marston
"Anthony Ferrara" wrote in message news:CAAyV7nHVNGG8yOyGhTE=pkaci4gdtgrdvcs4rdxb2flmny4...@mail.gmail.com... Dmitry, On Tue, Sep 22, 2015 at 3:19 PM, Dmitry Stogov wrote: On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara wrote: Dmitry, On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov wr

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-23 Thread Björn Larsson
Den 2015-09-22 kl. 03:59, skrev Bob Weinand: Hey, Thanks for all your feedback in the discussion thread! So, before I start the vote, just two quick notes: I've added two notes about the statement syntax and the single variable use. Though a few people complained, I'm not switching to the ==> o

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Wed, Sep 23, 2015 at 12:00 AM, Anthony Ferrara wrote: > Dmitry, > > On Tue, Sep 22, 2015 at 3:19 PM, Dmitry Stogov wrote: > > > > > > On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara > > wrote: > >> > >> Dmitry, > >> > >> On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov wrote: > >> > On Tue,

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Anthony Ferrara
Dmitry, On Tue, Sep 22, 2015 at 3:19 PM, Dmitry Stogov wrote: > > > On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara > wrote: >> >> Dmitry, >> >> On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov wrote: >> > On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand >> > wrote: >> > >> >> >> >> > Am 22.09.2015

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 9:24 PM, Bob Weinand wrote: > > Am 22.09.2015 um 20:05 schrieb Dmitry Stogov : > > The current PHP version emits two warning on similar constructs, and this > is explainable because we explicitly "use" $y. > > $ sapi/cli/php -r 'function foo(){(function($x) use ($y){$y=3;

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara wrote: > Dmitry, > > On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov wrote: > > On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand > wrote: > > > >> > >> > Am 22.09.2015 um 17:36 schrieb Dmitry Stogov : > >> > > >> > On Tue, Sep 22, 2015 at 4:54 PM, Joe

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Bob Weinand
> Am 22.09.2015 um 20:05 schrieb Dmitry Stogov : > > The current PHP version emits two warning on similar constructs, and this > is explainable because we explicitly "use" $y. > > $ sapi/cli/php -r 'function foo(){(function($x) use ($y){$y=3; return > $y+$x;})(5);return $y;} var_dump(foo());' >

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Anthony Ferrara
Dmitry, On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov wrote: > On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand wrote: > >> >> > Am 22.09.2015 um 17:36 schrieb Dmitry Stogov : >> > >> > On Tue, Sep 22, 2015 at 4:54 PM, Joe Watkins >> wrote: >> > >> >> I'd really like to understand what you're tryi

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand wrote: > > > Am 22.09.2015 um 17:36 schrieb Dmitry Stogov : > > > > On Tue, Sep 22, 2015 at 4:54 PM, Joe Watkins > wrote: > > > >> I'd really like to understand what you're trying to say there Dmitry, > but > >> I don't get it. > >> > >> What is your

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Bob Weinand
> Am 22.09.2015 um 17:36 schrieb Dmitry Stogov : > > On Tue, Sep 22, 2015 at 4:54 PM, Joe Watkins wrote: > >> I'd really like to understand what you're trying to say there Dmitry, but >> I don't get it. >> >> What is your example function trying to show ? >> >> As it mentions in the RFC, vars

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 4:54 PM, Joe Watkins wrote: > I'd really like to understand what you're trying to say there Dmitry, but > I don't get it. > > What is your example function trying to show ? > > As it mentions in the RFC, vars in short closure are by-value, so I can't > see what side effect

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Joe Watkins
I'd really like to understand what you're trying to say there Dmitry, but I don't get it. What is your example function trying to show ? As it mentions in the RFC, vars in short closure are by-value, so I can't see what side effects you might be thinking of ? Cheers Joe On Tue, Sep 22, 2015 at

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Peter Petermann
Hi, The introduction claims: "he current implementation of anonymous functions in PHP is quite verbose compared to other languages. That makes using anonymous functions be more difficult than it could be, as there is both more to type, and more importantly the current implementation makes it hard

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
I'm against the magic - "automatically use () all of the (compiled) variables". I'm also against compound short closures with curly brackets. in my opinion they opens too many ambiguous questions. function foo() { (($x) ~> {$y = 3; return $y + $x;})(5); return $y; } also think about nested cl

[PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-21 Thread Bob Weinand
Hey, Thanks for all your feedback in the discussion thread! So, before I start the vote, just two quick notes: I've added two notes about the statement syntax and the single variable use. Though a few people complained, I'm not switching to the ==> operator, as I noticed many people expected typ