Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69165 invoked from network); 23 Dec 2014 19:43:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2014 19:43:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:52319] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/30-01814-4D5C9945 for ; Tue, 23 Dec 2014 14:43:16 -0500 Received: (qmail 22592 invoked from network); 23 Dec 2014 20:43:12 +0100 Received: from 191-149.61-188.cust.bluewin.ch (HELO RoLaptop) (188.61.149.191) by ns73.kreativmedia.ch with ESMTPSA (AES256-SHA encrypted, authenticated); 23 Dec 2014 20:43:12 +0100 To: "'Stanislav Malyshev'" , "'Leigh'" , Cc: "'PHP internals'" References: <001e01d01e97$143188f0$3c949ad0$@tutteli.ch> <5499B598.8070000@gmail.com> In-Reply-To: <5499B598.8070000@gmail.com> Date: Tue, 23 Dec 2014 20:43:12 +0100 Message-ID: <003e01d01ee8$b0683650$1138a2f0$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHaTeZ4TS5D6zo2msbtZKszagOuvgEaUR5nAgrJdrkCpmEkEJxa2T9w Content-Language: de-ch Subject: AW: AW: [PHP-DEV] [RFC] Package private class From: php@tutteli.ch ("Robert Stoll") > -----Urspr=C3=BCngliche Nachricht----- > Von: Stanislav Malyshev [mailto:smalyshev@gmail.com] > Gesendet: Dienstag, 23. Dezember 2014 19:34 > An: Robert Stoll; 'Leigh'; guilhermeblanco@gmail.com > Cc: 'PHP internals' > Betreff: Re: AW: [PHP-DEV] [RFC] Package private class >=20 > Hi! >=20 > > > > namespace ch.tutteli.foo{ public for ch.tutteli.bar, ch.tsphp* = private > > class Foo{} } >=20 > 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. >=20 > 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. >=20 > -- > Stas Malyshev > smalyshev@gmail.com >=20 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