Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41481 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6182 invoked from network); 27 Oct 2008 19:29:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 19:29:14 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.26.184 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.26.184 c2beaomr06.btconnect.com Received: from [213.123.26.184] ([213.123.26.184:15205] helo=c2beaomr06.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/0A-34199-38616094 for ; Mon, 27 Oct 2008 14:29:08 -0500 Received: from [127.0.0.1] (host81-138-11-136.in-addr.btopenworld.com [81.138.11.136]) by c2beaomr06.btconnect.com (MOS 3.8.6-GA) with ESMTP id AQT52277; Mon, 27 Oct 2008 19:29:04 GMT Message-ID: <4906168C.7060900@lsces.co.uk> Date: Mon, 27 Oct 2008 19:29:16 +0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12 MIME-Version: 1.0 To: PHP internals References: <49047D62.1030900@lsces.co.uk> <49059FC1.2060702@vector-seven.com> <9b3df6a50810270411t2b8e050au33d68564225311d4@mail.gmail.com> <4905A81F.3070506@vector-seven.com> <20081027121602.GY30862@mint.phcomp.co.uk> <261daaa10810270552s954e580u3151a3c2002343db@mail.gmail.com> In-Reply-To: <261daaa10810270552s954e580u3151a3c2002343db@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Status: score=10/50, host=c2beaomr06.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A0B0208.49061681.0069,ss=1,fgs=0, ip=127.0.0.1, so=2007-10-30 19:00:17, dmn=5.7.1/2008-09-02 X-Junkmail-IWF: false Subject: Re: [PHP-DEV] RE: From: lester@lsces.co.uk (Lester Caine) Vesselin Kenashkov wrote: > 1. One user of namespaced constants & functions here... I dont like to use > objects for everything. I have very few constants & functions but I would > like them to remain constants & functions instead of converting them to > static classes or object methods. > 2. One reason against dropping ns for functions & constants is that if you > drop them how you can namespace legacy (or to avoid that word, not OOP) > code? This way many libraries can not be namespaced and if you have a name > collision you will not be able to solve it using namespaces. > 3. I prefer using\name\spaces instead of prefixing_my_classes. Here is why - > I want to organize my files in a hierarchical way in the file structure. A > possible solution withtout namespace using prefixes couldbe > level1_level2_classname (spliting the name by _). But if I want it to be > class_name? Then I have an confusion. And I personaly dislike camelCase and > level1_level2_className does not works for me. > Because of this I prefer to have namespaces instead of class prefixes. Then > I can do name\space\class_name. > 4. When you have namespace you can short_the_long_class_name used multiple > times in your code importing the namespace and then using the 'shortcut'. > > I put the last two just to explain why I prefer to have namespace with > whatever by separator instead of dropping them. I'm with you on that Vesselin. Will I use namespace - probably not, but I can see straight away blocks of code in projects I'm involved with that require functions at least in the namespace. SO they should be re-written? Probably, but one of the tidiest ways of handling even that is to wrap the legacy code in it's own namespace. If functions and constants were dropped simply to push an incomplete solution through, then it would cause a lot more trouble than the current flack. The result is not 'ideal' but it is perfectly functional and from what I've seen so far WILL work with legacy code. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php