Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30987 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4494 invoked by uid 1010); 16 Jul 2007 16:34:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4474 invoked from network); 16 Jul 2007 16:34:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2007 16:34:36 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:18290] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/24-09703-81E9B964 for ; Mon, 16 Jul 2007 12:34:35 -0400 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 16 Jul 2007 09:34:30 -0700 Message-ID: <469B9E12.7050104@zend.com> Date: Mon, 16 Jul 2007 09:34:26 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Giedrius D CC: internals@lists.php.net References: <3d1a63d10707150624y2b166f33y1bf3f628aba596b2@mail.gmail.com> <469AD3F8.40109@zend.com> <3d1a63d10707160001p64eff2fdy3fa1707679a5d05b@mail.gmail.com> In-Reply-To: <3d1a63d10707160001p64eff2fdy3fa1707679a5d05b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jul 2007 16:34:30.0042 (UTC) FILETIME=[2EC4D7A0:01C7C7C7] Subject: Re: [PHP-DEV] Simple Namespace Proposal From: stas@zend.com (Stanislav Malyshev) > a) I was talking about namespace name "A_B" not class/function name. _ is legal identifier character, so it would not be a good idea to use it as a separator. :: on the other side is natural scope separator in many languages. But I'm rather reluctant to start the "my separator is better than yours" thread for the 42th time :) > b) So as far as I understand "import" doesn't actually *import* names > from specified > namespace to the current one but just renames long namespace name to a > shorter one. And if I get it right the separator in the namespace name > is allowed > and required only to express default name when importing without "as". > Am I right? Not exactly. It does import, but not names just one name - the very same name it has as an argument. The :: is used to join components of the name. Note that you can also do: import Foo::XML as myXML; $a = new myXML::Data::Document(); if you wish so. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com