Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:921 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52213 invoked by uid 1007); 15 Apr 2003 04:40:22 -0000 To: internals@lists.php.net Message-ID: <3E9B8EEF.6030606@chiaraquartet.net> Date: Tue, 15 Apr 2003 00:47:43 -0400 User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 66.65.33.77 Subject: single colon allowed in identifiers From: greg@chiaraquartet.net (Greg Beaver) Hi, I've been thinking about the allowance of a single colon as syntactic sugar, and have several considerations to raise: -This code is VERY confusing and should be legal: namespace my:confusion { define("test",6); } namespace my { class confusion { const test = 6; } } $a = (new my::confusion ? my:confusion::test : my::confusion::test); -the #1 question on php.pear.general will become "I tried to use PEAR::Package_Name::Class_Name and it didn't work! Why?" Is it absolutely necessary to prevent the nesting of namespaces, to allow sub-packaging like PEAR::Package_Name? This sub-packaging is a very active part of how PHP is actually being used, and would make a great deal of sense. If the above possibility is out of question, I am strongly in favor of removing the confusion of allowing a single colon. The underscore works just fine (PEAR_Package_Name::Class_Name) Thanks, Greg