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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php