"Rowan Collins"  wrote in message news:56d42cd3.6020...@gmail.com...

Tony Marston wrote on 29/02/2016 09:55:
"James Titcumb"  wrote in message
news:CAKnqCEY7art1GUWG=pm0wypgqmyp0dq8oxdohgbksgq+o_b...@mail.gmail.com...


On 28 Feb 2016 06:18, "Jakub Kubícek" <kelerest...@gmail.com> wrote:

I see a difference in its
_semantics_. While the `public` modifier states anyone can change the
property, `var` is useful for marking internal properties which must
be public, but should not be manipulated by simply anybody

If it's public, it will be modified by someone.

Incorrect. It *may* be modified, but surely any invalid modifications
will be detected in the testing phase?

Detected by whom? Using what tool?

If changing a variable directly instead of using a setter does not produce an error that can be detected in your testing, whether that testing is automated or manual, then is there actually an error? If doing something does not cause a problem there there is no problem that needs fixing. Preventing something from happening which does not cause an error even if it did happen seems like wasted effort to me.

--
Tony Marston



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to