> -----Ursprüngliche Nachricht-----
> Von: Stanislav Malyshev [mailto:smalys...@gmail.com]
> Gesendet: Dienstag, 23. Dezember 2014 19:34
> An: Robert Stoll; 'Leigh'; guilhermebla...@gmail.com
> Cc: 'PHP internals'
> Betreff: Re: AW: [PHP-DEV] [RFC] Package private class
> 
> Hi!
> 
> >
> > namespace ch.tutteli.foo{ public for ch.tutteli.bar, ch.tsphp* private
> > class Foo{} }
> 
> This looks like a recipe for totally unmaintainable situation, where each 
> class has its own list of places where it is visible, and
> the lists are different for each class. I can kind of get when the people 
> want a class that is not visible to other code. But if it's
> not the situation, just use regular class.
> 
> I don't think PHP needs arcane rules of class visibility that will be used by 
> 0.001% of users and even those would probably
> use it wrong since there's no way to keep all those individual lists in sync.
> 
> --
> Stas Malyshev
> smalys...@gmail.com
> 

One common place where you actually want such a feature is when you write 
unit-tests for such a private class which you do not want to place into the 
same namespace. But I agree, the ch.tphp* example is probably going too far.

Cheers,
Robert


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

Reply via email to