Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41085 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44067 invoked from network); 15 Oct 2008 18:42:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2008 18:42:02 -0000 X-Host-Fingerprint: 64.8.134.189 unknown Received: from [64.8.134.189] ([64.8.134.189:13653] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/01-39277-A7936F84 for ; Wed, 15 Oct 2008 14:42:02 -0400 Message-ID: To: internals@lists.php.net Date: Wed, 15 Oct 2008 13:41:59 -0500 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) 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> <1F.01.19544.F55F5F84@pb1.pair.com> In-Reply-To: <1F.01.19544.F55F5F84@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 64.8.134.189 Subject: Re: [PHP-DEV] namespaces and alpha3 From: rpanning@gmail.com (Ryan Panning) Elizabeth M Smith wrote: > 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 > Honestly, either the tough choices must be made soon or namespaces has to be held until 6. IMO From my experience using namespaces #1 AND #2 would make namespaces solid (again IMO). The only thing for #1 is that I wouldn't want to see -> reused, as others have mentioned. Maybe :> or something else. Same for #3, :: just causes confusion. I don't really care what it's changed to, ::: is fine, it just cannot be :: Take a look at what autoload gets when an undeclared namespace, class, whatever is called. That will give you the idea on how autoload doesn't really know what is being called. With the change in #3 and addition of #1, it would be possible to know what is being called. Seriously, why is changing :: seem like such a problem?