Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31809 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99585 invoked by uid 1010); 21 Aug 2007 19:39:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99569 invoked from network); 21 Aug 2007 19:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2007 19:39:53 -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 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:36396] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/80-29144-88F3BC64 for ; Tue, 21 Aug 2007 15:39:52 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 2B1F2C0DD61; Tue, 21 Aug 2007 12:30:43 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-1-170.neb.res.rr.com [76.84.1.170]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 3775EC0DD60; Tue, 21 Aug 2007 12:30:42 -0700 (MST) Message-ID: <46CB3DF1.5090203@chiaraquartet.net> Date: Tue, 21 Aug 2007 14:33:05 -0500 User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Dmitry Stogov CC: 'internals Mailing List' , 'Stanislav Malyshev' References: <46C9F217.8040804@chiaraquartet.net> <000001c7e3cb$9a80b160$6e02a8c0@thinkpad> In-Reply-To: <000001c7e3cb$9a80b160$6e02a8c0@thinkpad> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] [PATCH] allowing multiple namespaces per file plus namespaces with brackets From: greg@chiaraquartet.net (Gregory Beaver) Dmitry Stogov wrote: > How about "import" statements? > The had effect on current file. How they will behave with your patch? > The import in one namespace will affect following namespaces... :) That's correct, import remains a per-file operation, and I pray to god that no one suggests making it anything else. This does mean, however, that if you try to "combine" two files that contain import statements, it will be necessary to expand the imports. Fortunately, since namespaces and imports are absolutely deterministic, this can be done quite easily. Note that your concern above is simply a documentation issue, users will use import correctly if the manual begins with something like: ====== import allows aliasing specific namespaced files and classes within a file. For example: Note that once a name has been imported to a file, all new classes within the file cannot conflict. The following file generates a fatal error even though gronk::bar is : Fatal error: Class name 'bar' coflicts with import name ===== That will clear up any possible confusion. > Also this change is inconsistent with renaming "namespace" to "package". Well it kind of makes namespaces behave more like namespaces, don't you think? I already expressed an earlier opinion that namespaces should be called namespaces, because that is a better name, but that is irrelevant. This patch has nothing to do with what we call the things, it adds missing functionality. You could say that it allows more than one package per file, but then you end up with namespaces in my opinion, so there you go. :) Greg