Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41709 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57831 invoked from network); 6 Nov 2008 10:03:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 10:03:50 -0000 Authentication-Results: pb1.pair.com header.from=iammrdan@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=iammrdan@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.134.190 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: iammrdan@googlemail.com X-Host-Fingerprint: 209.85.134.190 mu-out-0910.google.com Received: from [209.85.134.190] ([209.85.134.190:49228] helo=mu-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/94-35522-501C2194 for ; Thu, 06 Nov 2008 05:03:50 -0500 Received: by mu-out-0910.google.com with SMTP id i2so472739mue.3 for ; Thu, 06 Nov 2008 02:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=GQ7SesezxG3tSN9s4NPNoqqIyVFYcZM+n1VFe8Kv8yw=; b=eL8ubLtuxhnIzQ4zZKrXbpd/NoWlK7Jbf57X9fqZYE8utmpJxzereDtL/sZ44vkSyq fHdcpiPaGOiap8IXLpqG4phP/STkMO7cvUs12DWRrOKs+y5c7eD00mgHVlhOtUg4rYmv 7JqN9eZUy/DurrsoqDl/mIT47Ofoi9rKMBXLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=nzBg1gNvbzKeqWfuadJSR9uiUI8z1eZNLf+2LiCG3MTdp/NUAnV4mM5cRT82JZPclp vxm7tyLRDi2B36WeQtYiWyO7MkBxxu2gDR7aafmddllulX2JLXj1WuXLKzdz/jGULe0W BaFZ1gK0fpM5mSeC/mqVnSrIQ/NVhIY0jwjns= Received: by 10.181.210.14 with SMTP id m14mr591637bkq.163.1225965826280; Thu, 06 Nov 2008 02:03:46 -0800 (PST) Received: by 10.181.222.7 with HTTP; Thu, 6 Nov 2008 02:03:46 -0800 (PST) Message-ID: Date: Thu, 6 Nov 2008 10:03:46 +0000 To: "troels knak-nielsen" Cc: "Larry Garfield" , internals@lists.php.net, ben@stickyeyes.com In-Reply-To: <98b8086f0811060150p2fb0312dj66896cb227c871ec@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7851_23959370.1225965826231" References: <4EA88C3A8A2747989925A5D21448FCE7@pc> <200811052154.29537.larry@garfieldtech.com> <98b8086f0811060150p2fb0312dj66896cb227c871ec@mail.gmail.com> Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? From: iammrdan@googlemail.com (Dan) ------=_Part_7851_23959370.1225965826231 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. Dan On Thu, Nov 6, 2008 at 9:50 AM, troels knak-nielsen wrote: > On Thu, Nov 6, 2008 at 10:35 AM, Dan wrote: > > What if you want to provide a set of helper/wrapper classes, > appropriately > > namespaced, something along the lines of: > > MyFramework\Helpers\Array > > MyFramework\Helpers\Database > > MyFramework\Helpers\Session > > etc. > > > > If I want to use that naming convention, I don't want to have to name > some > > of my classes differently just because PHP can't deal with it. It may not > be > > trivial to fix, but to the end-developer, it's a trivial problem and it's > > something that should just work. > > I think the point is the same as with Zend_Validate_Interface ; While > MyFramework\Helpers is a fair namespace, Array is a bad classname. You > should use something like MyFramework\Helpers\ArrayHelper > > FWIW Zend_Validate_Interface looks odd to me today already, for that > reason exactly. I read two namespaces and a classname, and that > classname doesn't make much sense. > > -- > troels > ------=_Part_7851_23959370.1225965826231--