Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34475 invoked by uid 1010); 26 Nov 2005 20:52:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34460 invoked from network); 26 Nov 2005 20:52:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2005 20:52:42 -0000 X-Host-Fingerprint: 66.17.140.42 ftcl002.digis.net Received: from ([66.17.140.42:2356] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 20/BA-56276-A1BC8834 for ; Sat, 26 Nov 2005 15:52:42 -0500 Message-ID: <20.BA.56276.A1BC8834@pb1.pair.com> To: internals@lists.php.net Date: Sat, 26 Nov 2005 14:52:35 -0600 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 66.17.140.42 Subject: namespace separator ideas From: cellog@php.net (Greg Beaver) Hi all, I have only one caveat with the \ separator, which is that it is a little bit too similar to division with /, and can result in some confusing code like: The same issue exists with all colon based separators (that sounds bad when read the wrong way...) because of the ternary operator, and :: with static classes/methods. class name1 { const name2 = 1; } $a = new name1:::name2; $b = name1::name2; // do you see the difference? I get confused ?> What about using the T_OBJECT_OPERATOR? This is a parse error in existing versions, and also implies some separation. class name1 { const name2 = 1; } $a = new name1->name2; $b = name1::name2; ?> I also proposed on IRC using \\ as this is similar to netware driver separators: However, I know Andrei hated this :). I very much prefer the use of ->, as this has the same advantage as :: of "rhyming" with current syntax. Greg