Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40745 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61253 invoked from network); 28 Sep 2008 22:21:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Sep 2008 22:21:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:36882] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/E0-53562-37300E84 for ; Sun, 28 Sep 2008 18:21:39 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id CDCADC0E838; Sun, 28 Sep 2008 15:20:26 -0700 (MST) Received: from [192.168.0.106] (unknown [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id DB7ABC0E833; Sun, 28 Sep 2008 15:20:25 -0700 (MST) Message-ID: <48E00373.8050407@chiaraquartet.net> Date: Sun, 28 Sep 2008 17:21:39 -0500 User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Guilherme Blanco , Steph Fox , Kevin Waterson , internals@lists.php.net, Andi Gutmans References: <59.6C.35835.FB3F8D84@pb1.pair.com> <20080924065741.50a30448.kevin@phpro.org> <002701c91dd1$89dad480$3ffc1f3e@foxbox> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] true namespaces, yet another point of view From: greg@chiaraquartet.net (Gregory Beaver) Lukas Kahwe Smith wrote: > > On 24.09.2008, at 01:17, Guilherme Blanco wrote: > >> For those that do not understand very well the explanation of jvlad... >> >> He's suggesting to change the class struct to be an scope struct, and >> have a property that tells if it's a namespace or a class, and reuse >> the implementation of class which already works very well. >> The nested support is achieved afai understand through the Adjacency >> List algorithm... can you confirm this to me? > > > or just leave the organization of things to classes (with long class > names with a nice prefix to prevent collissions) and leave it to > class_alias() (and equivalent features for functions .. also with the > option of a compile time aliasing) to handle the aliasing. > > this removes the need for namespaces and use statements, while making it > possible to make class/function names short (that are long for > organizational and collision prevention reasons). Hi, This approach doesn't work because aliasing with class_alias() does not allow name conflicts: results in: Warning: Cannot redeclare class XMLReader in /home/cellog/workspace/php5/test.php on line 4 whereas: results in: hi Greg