Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21873 invoked from network); 25 Sep 2008 17:09:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2008 17:09:12 -0000 X-Host-Fingerprint: 85.21.236.169 xdmitri.dialup.corbina.ru Received: from [85.21.236.169] ([85.21.236.169:21532] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/20-19781-6B5CBD84 for ; Thu, 25 Sep 2008 13:09:12 -0400 Message-ID: <37.20.19781.6B5CBD84@pb1.pair.com> To: internals@lists.php.net References: <59.6C.35835.FB3F8D84@pb1.pair.com> <20080924065741.50a30448.kevin@phpro.org> <002701c91dd1$89dad480$3ffc1f3e@foxbox> Date: Thu, 25 Sep 2008 21:09:08 +0400 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response X-Posted-By: 85.21.236.169 Subject: Re: [PHP-DEV] true namespaces, yet another point of view From: dmda@yandex.ru ("jvlad") > > 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). > > regards, > Lukas Kahwe Smith > > No, you can't use classes for this. They can't contain the other classes and you can't have a class spanned across several files. There are some other important differences from the compiler perspecives, but still namespaces and classes are containers and you can access their members with exactly the same syntax constructs so it's not only possible but reasonable to implement them very close to each other, as I suggested in one hashtable. As a side effect it will remove the problem with class vs namespace ambiguity. JV