Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31231 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86446 invoked by uid 1010); 24 Jul 2007 02:52:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86431 invoked from network); 24 Jul 2007 02:52:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2007 02:52:50 -0000 Authentication-Results: pb1.pair.com header.from=slackmase2@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=slackmase2@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.162.239 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: slackmase2@gmail.com X-Host-Fingerprint: 64.233.162.239 nz-out-0506.google.com Received: from [64.233.162.239] ([64.233.162.239:56602] helo=nz-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/D0-11831-08965A64 for ; Mon, 23 Jul 2007 22:52:49 -0400 Received: by nz-out-0506.google.com with SMTP id x7so1181038nzc for ; Mon, 23 Jul 2007 19:52:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nQXqVWxtsp9fDPn2h5u9G/+uX6UUPHy9Cnkwzx4M5rVjgAP+pD9khd5BZ6FoD3UXwFBNwe7hO0OrEIaOvSDC16Y4Q9NjBLL/VsDmN3Alrx/bPLkHhnRKGbGy9CHZsohsuxQEVzuu9sc5GQxj0XzqOKDYJx0QdbCO65qUksgMacU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GC12QxBQDU8lhdpxu+DQA0ZrcM5MZjhvyUX3skIlSji0809y6CXqa51sgp3fH1Cr+BIy9e5+avhCjTWC8vmfJfuBYikzqYbrAGSHWFMeOcCNtg6Z/Qvav57blutR5z5Irhy0L96fuS6Lor53gbk9UZ8DNJTmVeXPZOTbjMA/Feo= Received: by 10.143.6.1 with SMTP id j1mr295357wfi.1185245565525; Mon, 23 Jul 2007 19:52:45 -0700 (PDT) Received: by 10.142.100.16 with HTTP; Mon, 23 Jul 2007 19:52:44 -0700 (PDT) Message-ID: <99cd336d0707231952l18dfde71pee6647bb80cf50c6@mail.gmail.com> Date: Tue, 24 Jul 2007 12:22:44 +0930 To: "Stanislav Malyshev" Cc: "=?ISO-8859-2?Q?Pawe=B3_Stradomski?=" , internals@lists.php.net In-Reply-To: <46A4D07A.7060006@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46A31D95.2080407@fischer.name> <200707231140.55535.pstradomski@gmail.com> <46A4BA4F.6090506@dealnews.com> <200707231643.22562.pstradomski@gmail.com> <46A4D07A.7060006@zend.com> Subject: Re: [PHP-DEV] Question about Namespace patch From: slackmase2@gmail.com ("Andy Mason") On 7/24/07, Stanislav Malyshev wrote: > > Because I just want those names directly available in one part of my > > application - the one which uses a lot of SQL. As far as I see this is not > > If you want names to be part of global space - don't use namespaces. > Namespaces are meant to take names OUT of global space. > > > All other languages I know that have namespaces (Java, python, C++) allow > > programmers to import other namespaces locally - usually for a single > file. > > Both Java and Python have much more rigid relations to files than PHP > does - in Java, class is file, more or less, and package is directory, Is this something that you would consider for PHP ? As far as I can tell from the list the two main considerations are not pushing the decision to the executor and it being simple. Would this not satisfy all of the above. At compile time you could import everything and still know where it came from because ultimately you have the namespace from the location of the file. Its pretty easy to explain, you did it in one line, and it would solve other peoples issues with namespaces without polluting the global namespace. The only downside is that this now requires a 1 class / file. This IMHO isn't a massive problem as long as it can be explained, and those who have the task of splitting this up now can do an import Foo::*; ? thoughts? Andrew > while in Python module is file and package is directory. Also, Java is a > compiled language - meaning you have much more information in compile > time than with PHP - all classes you use are to be known compile-time. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >