Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33037 invoked from network); 27 Feb 2013 07:07:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2013 07:07:33 -0000 Authentication-Results: pb1.pair.com header.from=ibmurai@me.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ibmurai@me.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain me.com designates 17.158.232.237 as permitted sender) X-PHP-List-Original-Sender: ibmurai@me.com X-Host-Fingerprint: 17.158.232.237 nk11p03mm-asmtp002.mac.com Solaris 10 1203 Received: from [17.158.232.237] ([17.158.232.237:61663] helo=nk11p03mm-asmtp002.mac.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/6A-61918-1B0BD215 for ; Wed, 27 Feb 2013 02:07:31 -0500 Received: from [192.168.1.64] (188-182-36-146-static.dk.customer.tdc.net [188.182.36.146]) by nk11p03mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MIV006TKAFUFM40@nk11p03mm-asmtp002.mac.com> for internals@lists.php.net; Wed, 27 Feb 2013 07:07:09 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-02-26_03:2013-02-26,2013-02-26,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=5 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1302260361 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable Message-ID: Date: Wed, 27 Feb 2013 08:07:06 +0100 To: "internals@lists.php.net" MIME-version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) Subject: I would like to write an RFC for the addition of an internal keyword From: ibmurai@me.com (Jens Riisom Schultz) Hi, I just want to get a feel for whether the following idea would be = instantly rejected (for example I get the feeling that adding keywords = is a big deal): Often, when writing frameworks, you need to make public or protected = functionality or classes which should only be called from inside the = framework. You CAN ensure this with a lot of ninja tricks and = debug_backtrace, but it is very cumbersome and often hides your methods = and properties from class signatures. Therefore I would propose adding a C# style "internal" keyword. ( = http://msdn.microsoft.com/en-us/library/7c5ka91b(v=3Dvs.80).aspx ) The idea is, simply, that functions, methods and classes marked as = "internal" would only be accessible from within the namespace in which = they are defined. For example the following class, "namespace Framework; internal class = Something {}", would only be visible from within the "Framework" = namespace. I have a hunch that this would be relatively easy to implement. If noone objects I would attempt to create a patch and an RFC. What do you think? -Jens Riisom Schultz=