Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41716 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84153 invoked from network); 6 Nov 2008 12:01:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 12:01:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=steph@phparch.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=steph@phparch.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain phparch.com from 64.99.136.181 cause and error) X-PHP-List-Original-Sender: steph@phparch.com X-Host-Fingerprint: 64.99.136.181 smtprelay-virgin0181.hostedemail.com Received: from [64.99.136.181] ([64.99.136.181:34636] helo=smtprelay-virgin.hostedemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/C9-35522-FACD2194 for ; Thu, 06 Nov 2008 07:01:53 -0500 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay04.hostedemail.com (Postfix) with SMTP id A09C1993CD3; Thu, 6 Nov 2008 12:01:49 +0000 (UTC) X-SpamScore: 1 X-Spam-Summary: 2,0,0,a59348ee3aadb68d,691ff1dea13fdf9b,steph@phparch.com,iammrdan@googlemail.com:bdavies@stickyeyes.com:troelskn@gmail.com:larry@garfieldtech.com:internals@lists.php.net,RULES_HIT:355:379:539:540:541:542:543:567:599:600:601:800:960:973:980:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1487:1500:1515:1516:1518:1535:1544:1587:1593:1594:1605:1711:1730:1747:1766:1792:2073:2075:2078:2198:2199:2379:2393:2553:2559:2562:2693:2828:2892:2910:2917:3027:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:3876:3877:4250:4321:5007:6114:6119:6261:7576:7653:7875:7903:8501:8660:8957,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none Received: from foxbox (62-31-252-63.cable.ubr07.shef.blueyonder.co.uk [62.31.252.63]) (Authenticated sender: steph.fox) by omf10.hostedemail.com (Postfix) with ESMTP; Thu, 6 Nov 2008 12:01:48 +0000 (UTC) Message-ID: <013b01c94007$b66d60a0$3ffc1f3e@foxbox> Reply-To: "Steph Fox" To: "Dan" , "Ben Davies" Cc: "troels knak-nielsen" , "Larry Garfield" , References: <4EA88C3A8A2747989925A5D21448FCE7@pc> <200811052154.29537.larry@garfieldtech.com> <98b8086f0811060150p2fb0312dj66896cb227c871ec@mail.gmail.com> <007301c93ffe$f4b5ad80$3ffc1f3e@foxbox> <029101c94004$d4564440$7d02ccc0$@com> Date: Thu, 6 Nov 2008 12:03:39 -0000 Organization: php|architect MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-session-marker: 73746570682E666F78 Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? From: steph@phparch.com ("Steph Fox") > In .NET, I can stick an Array class into my own namespace, extending the > System.Array type if I want to and use it in my code without issue. Why > can > I not do that here? Is it simply that you're so worried about backwards > compatibility that you feel that you can't make the necessary changes to > the > language to implement something fully? .NET is an object oriented language. It has something called System.Array. PHP is a hybrid language. It does not and hopefully never will have something called System.Array. It's like the difference between English and Esperanto... and you're telling us 'cough' should rhyme with 'cow' because that's how Esperanto would have it. But English is so much easier to learn, if more difficult to master, that it's become the lingua franca for the 'net. - Steph > > Dan > > > On Thu, Nov 6, 2008 at 11:43 AM, Ben Davies > wrote: > >> > Isn't the ability to do that one of the biggest reasons for having >> > namespaces? To avoid having to fill your class names with junk. >> > The examples are namespaced appropriately, they tell the developer that >> > it's >> > a Helper for Arrays in the MyFramework framework. I shouldn't need to >> > suffix >> > the class name with 'Helper' to reconfirm that, just because the PHP >> > engine >> > doesn't like it. >> >> "This thread really should be re-titled to "allow reserved words as a >> classname or not". Then perhaps the only logical response to the question >> would be so obvious that there would be no thread... oo-er..." >> >> I think you might be deliberately missing Dan's point here: array is a >> reserved word because it is not namespaced. If the PHP native function >> array() was namespaced to PHPCore\array() then Dan could create a class >> or >> function called array under his own namespace. This is exactly what >> namespacing affords us. >> >> array() is only a reserved word because it is not a directly accessable >> native datatype. If array() was an object Array, this wouldn't be a >> problem. >> >> This namespaces issues highlights the very fundamental issues with PHP, >> and >> glib, childish responses like yours only serve to score points. >> >> Grow up and join the conversation. >> >> >> Ben Davies | Lead Developer | Stickyeyes >> 6th Floor, >> West One, >> Wellington Street, >> Leeds, LS1 1BA >> Email: ben@stickyeyes.com >> 0113 391 2929 | | Fax 0113 391 2939 >> >> This e-mail may contain information that is privileged, confidential or >> otherwise protected from disclosure. It must not be used by, or its >> contents >> copied or disclosed to persons other than the intended recipient. Any >> liability (in negligence or otherwise) arising from any third party >> acting, >> or refraining from acting, on any information contained in this e-mail is >> excluded. The views expressed may not be official company policy, but >> instead, the personal views of the originator. If you have received this >> e-mail in error please notify the sender and delete the e-mail. >> >> >> >> -----Original Message----- >> From: Steph Fox [mailto:steph@php.net] >> Sent: 06 November 2008 11:01 >> To: Dan; troels knak-nielsen >> Cc: Larry Garfield; internals@lists.php.net; ben@stickyeyes.com >> Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? >> >> > Isn't the ability to do that one of the biggest reasons for having >> > namespaces? To avoid having to fill your class names with junk. >> > The examples are namespaced appropriately, they tell the developer that >> > it's >> > a Helper for Arrays in the MyFramework framework. I shouldn't need to >> > suffix >> > the class name with 'Helper' to reconfirm that, just because the PHP >> > engine >> > doesn't like it. >> >> This thread really should be re-titled to "allow reserved words as a >> classname or not". Then perhaps the only logical response to the question >> would be so obvious that there would be no thread... oo-er... >> >> - Steph >> >> >