Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71916 invoked from network); 15 Oct 2008 13:51:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2008 13:51:28 -0000 X-Host-Fingerprint: 24.247.219.180 24-247-219-180.dhcp.cdwr.mi.charter.com Received: from [24.247.219.180] ([24.247.219.180:16338] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/01-19544-F55F5F84 for ; Wed, 15 Oct 2008 09:51:28 -0400 Message-ID: <1F.01.19544.F55F5F84@pb1.pair.com> To: internals@lists.php.net Date: Wed, 15 Oct 2008 09:51:55 -0400 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 References: <696583.1217.qm@web707.biz.mail.mud.yahoo.com> <48F4F7EE.2030609@zend.com> <007b01c92e37$b2952e90$3ffc1f3e@foxbox> <48F4FAF4.50509@zend.com> <00e101c92e3c$d5194b90$3ffc1f3e@foxbox> <48F5075C.2050807@zend.com> <31748C8A-66EA-4A27-9E27-486A4C398F5D@pooteeweet.org> <018401c92e41$ef89b0a0$3ffc1f3e@foxbox> <698DE66518E7CA45812BD18E807866CE021B6406@us-ex1.zend.net> <7f3ed2c30810150506p426a5e84wfea92d3a5d78960c@mail.gmail.com> In-Reply-To: <7f3ed2c30810150506p426a5e84wfea92d3a5d78960c@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 24.247.219.180 Subject: Re: [PHP-DEV] namespaces and alpha3 From: auroraeosrose@gmail.com (Elizabeth M Smith) > Thats awesome. > By the way, what is "it"? > I haven't had the chance of following the hundreds of namespaces > threads with thousands of replies. All I have gather so far is a > massive amount of FUD. > > Could someone summarize what you are trying to convince Greg to agree > on? I would greatly appreciate if that post would not get +100 replies > under an hour. > > > -Hannes Have to agree on the FUD thing - how many people commenting on this thread have actually tried the current namespaces implementation for themselves? Or are they simply parroting what they've read or what others have said? Maybe a prerequisite for any kind of vote should include actual code written using namespaces. And yes, I have some sitting around in public svn ;) But I'm not crass enough to spam the list with the url, email me privately if you want to see it. I use to have many issues with namespaces - compromises and good code have knocked off most of the problems and I'm almost happy. I really only have one issue left with namespaces. This remaining issue is of course the "is it a method or is a function" problem foo::bar::baz(); - is this calling function baz in namespace foo::bar? or is it calling static method bar::baz in namespace foo? This can be solved in three ways. 1. Greg's "leaf" solution foo::bar->baz(); - namespace foo::bar, function baz foo->bar::baz(); - namespace foo, static method bar::baz Personally I don't like this, get confusing even if we pick some weird operator like :> 2. Don't allow functions or constants in namespaces Simplest solution but appears to piss off all the people who have never actually used the current implementation or hate OO on principle 3. Steph's idea - Change the separator (I vote ':::' - easy to do, similar to what we have already) foo:::bar:::baz(); - namespace foo:::bar function baz foo:::bar::baz(); - namespace foo, static method bar::baz I like this too, minus the headache of arguing over the namespace separator (again) - in a perfect world this would be a single colon, but the ternary issues (people write stupid code, so we have to cater to them) strikes again. $foo = $myvar ? foo:bar:hello; - craziness, although personally I'd say "always take the last :" for issues like this and document the hell out of it... $foo = $myvar ? (foo:bar):hello; or $foo = $myvar ? foo:(bar:hello); should give you the right thing... But I digress. I know a lot of people are simply filtering out the namespace "noise" or are "voting on gut reactions" - "OMG the people who write the code are arguing, it must totally suck" ... Write some code using the current namespaces implementation. Functional and OO. Then decide, don't listen to people bitching or wait for someone else to summarize issues they've found. People not trying it are how we got into this mess in the first place. Thanks, Elizabeth Smith