Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32719 invoked from network); 27 Oct 2008 15:13:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 15:13:54 -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 72.14.220.153 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: 72.14.220.153 fg-out-1718.google.com Received: from [72.14.220.153] ([72.14.220.153:47341] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/3C-34199-DAAD5094 for ; Mon, 27 Oct 2008 10:13:52 -0500 Received: by fg-out-1718.google.com with SMTP id 16so2235546fgg.23 for ; Mon, 27 Oct 2008 08:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=Zq2TZYKt+f0zb7ZztJ0DcllSwybjmhe7T+j4tdEPnU8=; b=uafU/10qSfJhYfNe+ukFmUxFBoPkw1m0ruNHCWmH4o4rR6SLGrXjavU/3aFLEC/29l QsaOYScKt0ZwA2Jks5HaJ0l4yOBpX3EbUINJZu72oNgNgzCOgZUIyImfcoNVoAIfgN/I 9hoFqYCJ88RPk9lhQHbRBRngcmFKuBwAS5Tqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=MywigA7O73N1kkQXtRiwJUytRYTYiB+gaRViBAqQQA7zzigKWY6OuzfnCZ3s4f1ZFG pd/+zXRtiR9KGxKG51OSRffx8MJh388UabwwomhOCxN8CeIVhJCAiE1HHg8iVNafT9Ev R6+3WYATdSliaUgRgWpZPIcGSwoh4TxwjhtCs= Received: by 10.181.135.12 with SMTP id m12mr1837707bkn.34.1225120425703; Mon, 27 Oct 2008 08:13:45 -0700 (PDT) Received: by 10.181.17.4 with HTTP; Mon, 27 Oct 2008 08:13:45 -0700 (PDT) Message-ID: <99cd336d0810270813p44f2ee7fke3734ff45f4be5a4@mail.gmail.com> Date: Tue, 28 Oct 2008 01:43:45 +1030 To: "Stanislav Malyshev" Cc: "Hannes Magnusson" , "Felipe Pena" , "Marcus Boerger" , "Lukas Kahwe Smith" , "PHP Internals List" , "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" In-Reply-To: <48B85548.1030608@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <64B4CECA-980F-4738-8B05-E7935741D7BB@pooteeweet.org> <7f3ed2c30808271132x7443ea3gc4df903a3a2c73ec@mail.gmail.com> <322434106.20080827234712@marcus-boerger.de> <1219885057.5961.13.camel@pena> <7f3ed2c30808272332m3066d1e5s677bb91f4b80c4b5@mail.gmail.com> <48B6E3A8.8030903@zend.com> <7f3ed2c30808291243x3ca7133cl5e15353368b25480@mail.gmail.com> <48B85548.1030608@zend.com> Subject: Re: [PHP-DEV] alpha2 scheduled From: slackmase2@gmail.com ("Andrew Mason") I think the majority of the namespaces stuff is fine. However, having read the irc discussion about how the namespaces seperator was decided upon, i don't think there are many people here who can honestly say that ease of typing is that big of a deal compared to maintainability and being able to easily read the code. Both Perl and C++ use :: to success. i don't know how much of an overlap there is in PHP and Perl or C++ programmers, so I'm not suggesting it for familiarity reasons, but i have never heard anyone say "i wish C++/ Perl used a different namespace separator. Stas: I believe you work for Zend ? Have you tried going through ZF and namespaced a few of the modules (using \ ) and then the code that uses it ? I tried to give it a go today with our framework internally and while i know the '\' has its merits, the code ( to us at least ) felt more cluttered. I will continue to use it for a few weeks as I have done C++ and Perl programming so familiarity might alter my perception. Where you can use the 'use' statements, i will admit, its not _that_ bad. If you have alot of overlap with a 3rd parties code base and 'use' doesn't work so well then it becomes very difficult to read. At least for my simple mind. I know that you say the majority of people didn't 'care' up until now but I feel thats untrue. The majority of people (I believe ) simply thought that namespaces was heading in the right direction. I for one was in this group although i have been mildly active on the list. The old style long class names approach of , $bar = new Module_Name_Foo_Bar(); imho is more clear than $bar = new Module\Name\Foo\Bar(); I still struggle to see how the :: is confusing or difficult to type. $bar = new Module::Name::Foo::Bar(); Even if this was erroneous with syntax highlighting and the syntax checker i really don't think its going to cause that much grief ( esp given Perl / C++ ) have had it for a while. is the below allowed ? $bar = new Module \ Foo \ Bar(); I find it easier to read than with out the space. i know with real namespaces you don't have to call the class Module_Foo_Bar but i think a few people might be considering sticking with the long classname approach. Many of the PHP community as a whole been very supportive of everyone working on the namespaces implemenation. There are a few vocal people on this list but the majority I think are quite happy with what was proposed previously. God knows we couldn't come up with a better implementation but it would be nice if you could all remember that we are using it day in day out as well. You have obviously seen how many people 'care' now , and my guess is that it's largely because they think this will have a big impact on their day to day use of the language. Since I haven't offered anything in the way of a solution yet, if i were to write something that allowed the users to choose which separator we used would that be considered ? If not, is it possible that you could ( if its not already) make it trivial to change for those of us who are willing to apply our own patches each time for our particular machines. I don't think forking the project would achieve much but it would be nice if I could maintain a small patchset which could be applied to each release. That way those who want it can have it. I'm not saying that '\' is a bad decision, They were all good reasons, I'm simply saying that there are a significant number of users who place a different priority on the reasons that those who made the decision. thank you for your time Andrew On Sat, Aug 30, 2008 at 5:30 AM, Stanislav Malyshev wrote: > Hi! > >> Seems like you are answering lot of questions about namespaces lately >> with "that's not how the model was designed". > > Not really, and it's not the reason, the reason why it wasn't designed that > way was explained before and was explained again. > >> Guess it should have been designed in the open to begin with. > > It was. Just a lot of people couldn't care less until it is a day before > feature freeze and then they wake up and want whole thing rewritten from > scratch, and don't even take time to think about what their changes really > mean and how it is going to work with all other parts of the language. > Namespaces is not the only case btw. > -- > 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 > >