Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39841 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20665 invoked from network); 11 Aug 2008 21:35:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2008 21:35:30 -0000 X-Host-Fingerprint: 200.150.147.21 unknown Received: from [200.150.147.21] ([200.150.147.21:23460] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/44-30561-0A0B0A84 for ; Mon, 11 Aug 2008 17:35:30 -0400 Message-ID: <61.44.30561.0A0B0A84@pb1.pair.com> To: internals@lists.php.net Date: Mon, 11 Aug 2008 18:38:52 -0300 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 References: <909776579.20080803142659@marcus-boerger.de> <840985F2-A701-4BE4-91F6-F6B39048CF9B@pooteeweet.org> <48A09FF4.1030101@zend.com> <7f3ed2c30808111411t51553771j389f05c3436bc625@mail.gmail.com> In-Reply-To: <7f3ed2c30808111411t51553771j389f05c3436bc625@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 200.150.147.21 Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: rodrigo.saboya@bolsademulher.com (Rodrigo Saboya) hannes.magnusson@gmail.com escreveu: > On 11/08/2008, Stanislav Malyshev wrote: >> Hi! >> >>> Ideally someone would summarize the discussion (or maybe two people, one >>> from each "camp") and then we can have a vote. Make it an RFC or >> OK, here it goes again: >> >> When we adopt some syntax, especially syntax matching some other >> language, we do not just introduce an otherwise meaningless sequence of >> symbols to be learned by users. We introduce concepts, and we create >> associative links with other languages. So, if we introduced the syntax >> for namespaces that is used by C++ - i.e. braces, we would imply that it >> has all the properties that C++ one has and that we encourage the usage >> patterns that C++ users adopt. Namely, that namespaces can be nested, >> that they are hierarchical, that namespaces can be used in any place in >> the file, just for one function/class or even variable without any >> influence on the surroundings, that using multiple namespaces in the >> same file, along with global space, is completely OK. > > So why the $%#$%& can't we use "package" if the implementation has > nothing incommon with namespaces in c++ (your example, not mine)? > > >> Added to that, braced namespaces would imply additional (and >> unnecessary) level of hierarchy and indentation for most editors and >> code formatters. >> [snip] >> With all that, there's not one thing that syntax with {} enables us to >> do and that is not possible to do right now (and that we want to do :). > > Well. I do want that indentation if I ever will be dumb enough to have > multiple namespace in the same file.. > > There is only one thing I could care less about than consistency, and > that is Windows. > Its not about consistency for me. Its about that little gut feeling you have. > To me it looks, and feels, much more like a namespace when you wrap it > in a namespace block. To me its more natural syntax. > > > -Hannes IMHO it doesn't make sense to have {} around namespaces if PHP recommends (imposes?) 1 namespace per file. I personally prefer the more C++-like way, described by Stanislav, where you can do pretty much anything namespace-wise. But if PHP is sticking to the prior, { } just looks wrong to me. -- Rodrigo Saboya