Re: [RFC Discussion] "var" Deprecation

From: Date: Mon, 14 Mar 2016 20:19:31 +0000
Subject: Re: [RFC Discussion] "var" Deprecation
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-91662@lists.php.net to get a copy of this message
Den 2016-03-14 kl. 19:14, skrev Colin O'Dell:
Forcing people to specify a visibility for properties and not for methods would add yet another inconsistency in the language.
That's a really good point. However, I think we currently have a different inconsistency: declaring functions without explicit visibility is possible without needing an extra (and redundant) keyword. The inconsistency you mention could easily be solved by a future RFC. We could: 1. Require visibility for class methods. 2. Allow declaring properties without using any keywords. 3. Use some other approach? I don't think we necessarily need to choose an option at this time (or perhaps ever). Interesting :) Think option 1 implies a BC break. Would it also affects interface
declarations making public keyword mandatory? Personally I like option 2, but feels a bit beyond the scope of this RFC. Regards //Björn

« previous php.internals (#91662) next »