RE: [PHP-DEV] Re: [RFC] [DISCUSSION] More precise float value

2015-09-26 Thread Anatol Belski
Hi Yasuo, > > Thanks for the ping. IMHO this is the stuff for 7.1. I actually saw the > discussions previously, but was rather thinking you was targeting 7.1 as that > was > already the time of the feature freeze. > > No problem. I'll update so that 0 mode is for 7.1. > JSON's is better to use l

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-26 Thread Rowan Collins
On 26/09/2015 19:37, Levi Morrison wrote: Thank you for the feedback. I feel like the rest of what you proposed was a bit too far outside of the box. For what it is worth no token after the paren is necessary – you could do `fn($x) $x * 2` (or `function($x) $x * 2`). I think this is a case where

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-26 Thread Levi Morrison
On Sat, Sep 26, 2015 at 12:31 PM, Levi Morrison wrote: > On Sat, Sep 26, 2015 at 11:07 AM, Rowan Collins > wrote: >> On 26/09/2015 17:17, Levi Morrison wrote: >>> >>> What concerns do you have about `fn($x) => $x * 2` or `function($x) => >>> $x * 2`? I will be writing a proper RFC later but I wa

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-26 Thread Levi Morrison
On Sat, Sep 26, 2015 at 11:07 AM, Rowan Collins wrote: > On 26/09/2015 17:17, Levi Morrison wrote: >> >> What concerns do you have about `fn($x) => $x * 2` or `function($x) => >> $x * 2`? I will be writing a proper RFC later but I wanted to get >> discussion going now. > > > If a keyword is requir

Re: [PHP-DEV] Arrow function expressions in PHP

2015-09-26 Thread Rowan Collins
On 26/09/2015 17:17, Levi Morrison wrote: What concerns do you have about `fn($x) => $x * 2` or `function($x) => $x * 2`? I will be writing a proper RFC later but I wanted to get discussion going now. If a keyword is required next to the parameters, having the => as a separate token looks a bi

[PHP-DEV] Re: Arrow function expressions in PHP

2015-09-26 Thread Levi Morrison
On Sat, Sep 26, 2015 at 10:17 AM, Levi Morrison wrote: > (Email in gist format: > https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) > > In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create > an anonymous function with one parameter `x` that will return `x * 2`. > For exa

[PHP-DEV] Arrow function expressions in PHP

2015-09-26 Thread Levi Morrison
(Email in gist format: https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create an anonymous function with one parameter `x` that will return `x * 2`. For example: (x) => x * 2 // is equivalent to: function(x) {

[PHP-DEV] Wiki RFC karma request: imsop

2015-09-26 Thread Rowan Collins
Hi, I would like to write up my suggestion of hasitem() and variable_exists() as a formal RFC. I have registered on the wiki with username "imsop", please could I have appropriate karma to draft the RFC. Cheers, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] Implementing Generics, and none scalar default properties.

2015-09-26 Thread Dominic Grostate
An alternative that rfc might be to add a modifier to ctor, something like. required public function __construct(); A required function cannot be final, because the intention is to allow it to be overridden, but it must be called by the child impl at some point. What do u think? On 26 Sep 2015 8:

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] Implementing Generics, and none scalar default properties.

2015-09-26 Thread Stanislav Malyshev
Hi! > Since there is no reason not to call parent ctor, maybe PHP should > somehow make every class have default empty ctor, if it doesn't have > one defined already - so you can write automatically > parent::__construct() everywhere? I completely agree with you, that's why I submitted https://wi

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] Implementing Generics, and none scalar default properties.

2015-09-26 Thread Pavel Kouřil
On Fri, Sep 25, 2015 at 11:53 PM, Stanislav Malyshev wrote: > Hi! > >> I'm thinking primarily of the benefit to base or abstract classes. For > > Both can have constructors. > >> base classes which expect certain properties be set, they are exposed to >> the danger of remaining unset if the deriv

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