Fleshgrinder wrote on 19/03/2016 10:48:
It is a sad state the implicit public properties use*var*  and implicit
public methods nothing, this makes the introduction of new visibility
modifiers terribly complicated.

I see it a bit differently - you could think of "var $foo" as shorthand for "public var $foo", in the same way that "function foo()" is shorthand for "public function foo()". Obviously, we don't actually allow "public var", but to me "var" has nothing to do with visibility, it's just a noise token like "function".

If we did want namespace/package/whatever visibility, it wouldn't make much sense for it to suddenly become the default for all legacy code, so it would need a new visibility keyword anyway, and that keyword would be available to all members as required - properties, methods, and even constants. I don't see that the existence of "var" makes any difference to that.

Regards,
--
Rowan Collins
[IMSoP]

Reply via email to