Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40753 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10731 invoked from network); 29 Sep 2008 06:13:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2008 06:13:19 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:40817] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/20-09415-EF170E84 for ; Mon, 29 Sep 2008 02:13:19 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id B54501EBC019; Mon, 29 Sep 2008 06:13:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H1UJ3gQR-rUu; Mon, 29 Sep 2008 08:13:16 +0200 (CEST) Received: from [192.168.0.151] (77-57-23-243.dclient.hispeed.ch [77.57.23.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 8F0D1414400B; Mon, 29 Sep 2008 08:13:14 +0200 (CEST) Cc: Guilherme Blanco , Steph Fox , Kevin Waterson , internals@lists.php.net, Andi Gutmans Message-ID: To: Gregory Beaver In-Reply-To: <48E00373.8050407@chiaraquartet.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Mon, 29 Sep 2008 08:13:02 +0200 References: <59.6C.35835.FB3F8D84@pb1.pair.com> <20080924065741.50a30448.kevin@phpro.org> <002701c91dd1$89dad480$3ffc1f3e@foxbox> <48E00373.8050407@chiaraquartet.net> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] true namespaces, yet another point of view From: mls@pooteeweet.org (Lukas Kahwe Smith) On 29.09.2008, at 00:21, Gregory Beaver wrote: > 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: Well my point was .. Library code uses long names, glue code can alias. Of course sometimes the lines between what is library and glue code are hard to draw. Anyways, I guess we are close to a good solution for namespaces in 5.3 .. regards, Lukas Kahwe Smith mls@pooteeweet.org