Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97066 invoked from network); 27 Feb 2013 15:23:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2013 15:23:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=krebs.seb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:49962] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/D1-20700-3D42E215 for ; Wed, 27 Feb 2013 10:22:59 -0500 Received: by mail-wi0-f176.google.com with SMTP id hm14so6416558wib.3 for ; Wed, 27 Feb 2013 07:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=l7tYlS9Vg1kkIM3Z03zuy/znpsNv8nkiygtGUDyxVi4=; b=ly1abrcvfVC7XbbT92S6tG9AGRrQb11EfrsN4dlZWVPrwoMMEOk2wlitRHLQbuIUb5 1sQzWIWO+6PcX9NrLW3QFYvHNcVDSd6t/S+bGCHIYUtCEWoxOfzN6KRSdCFsdO5u33Hb 05e+PZPEsDWYBB5/YFVf42fhPR0Zlba1HM4I3ROqftfPeKeyp/gAx4qItMJVVXXAEwsm rTc15EJzJrcSlyAbmJHKl3Md2PC9o3sj8OxcQplXb1f13RS0YnYychjejThIMMHifhZT U5+uI9q6ijCkkk2jNDcvSy7kbM7antEzoZ2mMaIsAiQRJP+tvrAHNanEqy7T5o8nh0m9 Dp0w== X-Received: by 10.180.86.136 with SMTP id p8mr4460639wiz.21.1361978576071; Wed, 27 Feb 2013 07:22:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.98.197 with HTTP; Wed, 27 Feb 2013 07:22:35 -0800 (PST) In-Reply-To: <512E2161.8060000@mrclay.org> References: <512E2161.8060000@mrclay.org> Date: Wed, 27 Feb 2013 16:22:35 +0100 Message-ID: To: Steve Clay Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d044286ce37f57d04d6b6599d Subject: Re: [PHP-DEV] I would like to write an RFC for the addition of an internal keyword From: krebs.seb@gmail.com (Sebastian Krebs) --f46d044286ce37f57d04d6b6599d Content-Type: text/plain; charset=ISO-8859-1 2013/2/27 Steve Clay > On 2/27/13 3:18 AM, Nikita Nefedov wrote: > >> I, for one, think it should be solved on the IDE side. I used a lot of >> Doctrine's internal >> methods lately and if they would be not accessible I wouldn't be able to >> do a lot of things. >> Of course internal methods/classes shouldn't be exposed as a part of API, >> but if they >> exist, I would want to call them *if I know what I'm doing*. I think it >> would be useful if >> phpdoc had an @internal tag so that IDEs could highlight places where you >> use internal >> parts of library. >> > > Agreed, IDE/phpDoc is the place for a solution (and I do recognize that > there is some need here). > > phpDoc already supports "@access private" for items to be left out of > public documentation. An IDE could be configured to have these items appear > greyed or not to appear in autocomplete lists. > a) You misuse the "private visibility" here: "@access private" comes from old PHP4-days, where the DocComment must know the visibility, because the method itself didn't b) Most doc-tools are able to generate developer-docs, which usually contain all protected and private elements. This "hidden element" will appear as regular private method there. Can be confusing I think :) > > There's already a way to tightly control access: embrace OOP and eliminate > statically accessible APIs (global vars/funcs and static props/methods) > that you don't want people calling. You don't actually need them. Although > closures helped too, PHP gained true information hiding in 5.0 with > "private". I agree > > > Steve Clay > -- > http://www.mrclay.org/ > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch --f46d044286ce37f57d04d6b6599d--