Re: Namespaces internal refactoring
| From: | Christoph M. Becker | Date: | Sun, 14 Aug 2016 23:53:36 +0000 |
| Subject: | Re: Namespaces internal refactoring | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95157@lists.php.net to get a copy of this message | ||
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