On 15.08.2016 at 00:11, Stanislav Malyshev wrote:

> Also, there's a difference IMO between classes and class' properties.
> Class details may be - indeed, need to be - hidden because this is what
> the class is, one of it's reasons to exist - a tool to reduce complexity
> by hiding irrelevant information and exposing only relevant information
> as class' public API. You hide things not because you're afraid evil
> users would abuse them - but as a service to the user to not overload
> their mental models with irrelevant details and allow to deal with the
> class by only considering the important things.

If it were only about suppressing unimportant details, documentation
would suffice, e.g. /** @private */ or the leading underscore
convention.  I am, however, quite happy to have language support to
catch *inadvertent* accesses.

-- 
Christoph M. Becker


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

Reply via email to