Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:40705 php.internals:40706 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58066 invoked from network); 26 Sep 2008 12:56:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2008 12:56:18 -0000 X-Host-Fingerprint: 82.41.135.70 82-41-135-70.cable.ubr02.glen.blueyonder.co.uk Received: from [82.41.135.70] ([82.41.135.70:18561] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/2A-19781-2FBDCD84 for ; Fri, 26 Sep 2008 08:56:18 -0400 To: internals@lists.php.net,RQuadling@GoogleMail.com Message-ID: <48DCDBE6.60703@gmail.com> Date: Fri, 26 Sep 2008 13:56:06 +0100 Reply-To: nrixham@gmail.com User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 CC: internals@lists.php.net References: <10845a340809260449k4771f60atbf837a897bf59182@mail.gmail.com> In-Reply-To: <10845a340809260449k4771f60atbf837a897bf59182@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.41.135.70 Subject: Re: [PHP-DEV] Namespace Question - Simple From: nrixham@gmail.com (Nathan Rixham) Richard Quadling wrote: > 2008/9/26 Nathan Rixham : >> Hi All, >> >> Can anybody answer the following question for me please. >> >> Why not follow (exactly) Java's strong static package/namespace system >> rather than a home grown dynamic namespace system? >> >> It works, it's common, logical, robust, a working model to follow, and ties >> in well with the PHP on Java movement. >> >> Regards, >> >> Nathan >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > From what I understand, JAVA is compiled and PHP isn't. PHP can > include namespaces/classes/etc. at run time. Whereas everything has to > be known upfront. > > Richard Quadling wrote: > 2008/9/26 Nathan Rixham : >> Hi All, >> >> Can anybody answer the following question for me please. >> >> Why not follow (exactly) Java's strong static package/namespace system >> rather than a home grown dynamic namespace system? >> >> It works, it's common, logical, robust, a working model to follow, and ties >> in well with the PHP on Java movement. >> >> Regards, >> >> Nathan >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > From what I understand, JAVA is compiled and PHP isn't. PHP can > include namespaces/classes/etc. at run time. Whereas everything has to > be known upfront. > > Thanks Richard, but you know what.. I asked completely the wrong question (it would appear I as everybody else, has very strong feelings on this); the problem/niggle here is that namespaces do not help me as a developer in the way they should; they're a bastardisation of namespaces to allow people to either - in fact I'm going to stop the ranting as it's pointless. Here's what *I* /as an OO developer/ need(?want): xmlString = TidySpace::tidy_repair_string( $xml ); } } } } ?> think that handle's everything; encourages a fixed file hierarchy for classes as well which would save so many headaches; additionally allows for "import" instead of the pesky include/require or auto-loading. *sorry* php dev's if you can do the above I'll be your best friends forever. ps: Yep I know I can avoid namespaces if I want (but can't really when other packages I'm using haven't avoided them..) - namespaces address a problem, which is there, and thus needs a solution, so will have to use them :) Regards & Great Work! Nathan (bows out)