[VOTE] var deprecation

php.internals

Colin O'Dell

10 years ago
Hello everyone, It has been two weeks since discussion started on the RFC to deprecate and eventually remove the "var" keyword (and one month since the idea was originally proposed). This RFC has therefore been moved to the "In Voting" state. Voting will begin immediately and will end in one week. You can find the full RFC (including the proposed patch and automatic upgrade tool) here: https://wiki.php.net/rfc/var_deprecation I encourage everyone to read the RFC and cast your vote towards whichever option you feel is the best for the language and the community. Regards, Colin O'Dell

Colin O'Dell

10 years ago
There have been some last-minute concerns raised about var being reserved "for future usage". My intent was that var couldn't be used for function/class names IN CASE it was re-used in the future, but not encouraging it to be re-used. I'd assume that reusing it would require a separate RFC to pass by a 2/3rds margin. Does anyone disagree with this interpretation or feel that it should be explicitly stated? Would anyone change their vote from NO to YES if "for future usage" was removed (but "reserving it" was kept in)? Would anyone change their vote from NO to YES if the question of "reserving it" could be voted on separately? If so, and we can stop the vote to make these changes, I'd strongly prefer to do so. I'd hate for three words to sink the entire RFC. (My apologies if this belongs in the discussion thread instead) Regards, Colin On Thu, Mar 24, 2016 at 8:40 AM Colin O'Dell <colinodell@gmail.com> wrote:

Mutlu Kocak

10 years ago
+1 var should be deprecated On Thursday, 24 March 2016, Colin O'Dell <colinodell@gmail.com> wrote:
> There have been some last-minute concerns raised about var being reserved > "for future usage". My intent was that var couldn't be used for > function/class names IN CASE it was re-used in the future, but not > encouraging it to be re-used. I'd assume that reusing it would require a > separate RFC to pass by a 2/3rds margin. > > Does anyone disagree with this interpretation or feel that it should be > explicitly stated? Would anyone change their vote from NO to YES if "for > future usage" was removed (but "reserving it" was kept in)? Would anyone > change their vote from NO to YES if the question of "reserving it" could be > voted on separately? > > If so, and we can stop the vote to make these changes, I'd strongly prefer > to do so. I'd hate for three words to sink the entire RFC. > > (My apologies if this belongs in the discussion thread instead) > > Regards, > > Colin > > On Thu, Mar 24, 2016 at 8:40 AM Colin O'Dell <colinodell@gmail.com > <javascript:;>> wrote: > > > Hello everyone, > > > > It has been two weeks since discussion started on the RFC to deprecate > and > > eventually remove the "var" keyword (and one month since the idea was > > originally proposed). > > > > This RFC has therefore been moved to the "In Voting" state. Voting will > > begin immediately and will end in one week. > > > > You can find the full RFC (including the proposed patch and automatic > > upgrade tool) here: https://wiki.php.net/rfc/var_deprecation > > > > I encourage everyone to read the RFC and cast your vote towards whichever > > option you feel is the best for the language and the community. > > > > Regards, > > > > Colin O'Dell > > >
-- Mutlu Koçak | Computer Scientist & Engineer Mobile: +420775259871 Parizksa 5, Praha 1 Prague Czech Republic Personal Website: http://www.mtkocak.com

Dmitry Stogov

10 years ago
Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove... ________________________________________ From: mtkocak@gmail.com <mtkocak@gmail.com> on behalf of Mutlu Kocak <mtkocak@mtkocak.net> Sent: Thursday, March 24, 2016 22:15 To: Colin O'Dell Cc: PHP Internals Subject: Re: [PHP-DEV] [VOTE] var deprecation +1 var should be deprecated On Thursday, 24 March 2016, Colin O'Dell <colinodell@gmail.com> wrote:
> There have been some last-minute concerns raised about var being reserved > "for future usage". My intent was that var couldn't be used for > function/class names IN CASE it was re-used in the future, but not > encouraging it to be re-used. I'd assume that reusing it would require a > separate RFC to pass by a 2/3rds margin. > > Does anyone disagree with this interpretation or feel that it should be > explicitly stated? Would anyone change their vote from NO to YES if "for > future usage" was removed (but "reserving it" was kept in)? Would anyone > change their vote from NO to YES if the question of "reserving it" could be > voted on separately? > > If so, and we can stop the vote to make these changes, I'd strongly prefer > to do so. I'd hate for three words to sink the entire RFC. > > (My apologies if this belongs in the discussion thread instead) > > Regards, > > Colin > > On Thu, Mar 24, 2016 at 8:40 AM Colin O'Dell <colinodell@gmail.com > <javascript:;>> wrote: > > > Hello everyone, > > > > It has been two weeks since discussion started on the RFC to deprecate > and > > eventually remove the "var" keyword (and one month since the idea was > > originally proposed). > > > > This RFC has therefore been moved to the "In Voting" state. Voting will > > begin immediately and will end in one week. > > > > You can find the full RFC (including the proposed patch and automatic > > upgrade tool) here: https://wiki.php.net/rfc/var_deprecation > > > > I encourage everyone to read the RFC and cast your vote towards whichever > > option you feel is the best for the language and the community. > > > > Regards, > > > > Colin O'Dell > > >
-- Mutlu Koçak | Computer Scientist & Engineer Mobile: +420775259871 Parizksa 5, Praha 1 Prague Czech Republic Personal Website: http://www.mtkocak.com

Thomas Punt

10 years ago
Hi Dmitry, > Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove... We're not going to remove the "var" keyword, just deprecate its usage in the context of setting properties as public. The "var" keyword will still remain a reserved word, and it can therefore still be reused in other places if we so wish (as has been done with "use" for namespaces, traits, and closures, as well as "as" in foreach, namespaces, and traits). So whilst Java is adding "var" for a short-hand declaration via type inference, it is only applicable to local variables and not properties. Deprecating "var" in this context for PHP is therefore not really the inverse of what Java is doing. -Tom

Christoph Becker

10 years ago
On 25.03.2016 at 08:12, Dmitry Stogov wrote:
> Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove...
If this JEP is going to pass, "var" will be allowed to replace (local) *type declarations*. In PHP "var" is an alternative *visibility specification*. That's something quite different.
-- Christoph M. Becker

Colin O'Dell

10 years ago
The voting period for the "var deprecation" RFC has ended. The final vote was 31 in favor and 23 against. The 2/3 majority requirement was not met and therefore this RFC has been DECLINED. https://wiki.php.net/rfc/var_deprecation#vote I'd like to thank everyone who participated in the discussions, and a special thanks to Thomas Punt for helping to create the proposed patch. Regards, Colin O'Dell On Fri, Mar 25, 2016 at 7:14 AM Christoph Becker <cmbecker69@gmx.de> wrote:

Björn Larsson

10 years ago
Hi, Thanks for a well specified RFc and I got a nifty script to update my old PHP 5.2 code :-) Regards //Björn Larsson Den 2016-03-31 kl. 14:41, skrev Colin O'Dell: