Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45726 invoked from network); 6 Nov 2008 09:35:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 09:35:23 -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.128.186 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.128.186 fk-out-0910.google.com Received: from [209.85.128.186] ([209.85.128.186:15674] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/F1-35522-95AB2194 for ; Thu, 06 Nov 2008 04:35:22 -0500 Received: by fk-out-0910.google.com with SMTP id 18so531918fks.7 for ; Thu, 06 Nov 2008 01:35:18 -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=1j4++VhawemPeVBYy3SkjwgGI4G46OxnWURUiYHqBOg=; b=JeBWiyP+CivxYkGixlUKdodi5s//PwTX+oOCs/kYwIZ8PR1CTg/G2C8kuh9QW6oVuh UNMS2xGr8HBWFTc1551sJl+hezK8deQxFyCIBRh3LRl2CWhRiOzjk9bkKoCeacPp8HWZ NLt4fVdv+P3vqKAFDcYlJrTcQOwznssS7H75M= 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=bwiYvoWNXa6+//eTMuAicVhLFe2Z6lUsO22gYgdTzNu65FInGuYt5XvgqTN4enlmaM bLadVDGC2K/ZAxIKY1QIi67p294RbL4ud2xjzQGJ62x2u6ym8qfXP94WHszUdh4dIIrW 3oasQYKRapcRnsgrEcf0GB5nls5Yx/KvCFI2A= Received: by 10.181.10.10 with SMTP id n10mr591293bki.68.1225964118379; Thu, 06 Nov 2008 01:35:18 -0800 (PST) Received: by 10.181.222.7 with HTTP; Thu, 6 Nov 2008 01:35:18 -0800 (PST) Message-ID: Date: Thu, 6 Nov 2008 09:35:18 +0000 To: "Larry Garfield" Cc: internals@lists.php.net In-Reply-To: <200811052154.29537.larry@garfieldtech.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7726_11784417.1225964118384" References: <4EA88C3A8A2747989925A5D21448FCE7@pc> <200811052154.29537.larry@garfieldtech.com> Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? From: iammrdan@googlemail.com (Dan) ------=_Part_7726_11784417.1225964118384 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. Dan On Thu, Nov 6, 2008 at 3:54 AM, Larry Garfield wrote: > On Wednesday 05 November 2008 9:24:15 pm Stan Vassilev | FM wrote: > > Hi, > > > > I just wanted a clarification on this. Currently many of us have class > > names such as: > > > > Zend_Validate_Interface > > Foo_Utils_Array > > > > ...and so on. This works fine as it's just a single T_STRING. > > > > As you know, with the new convention, the parser will not encounter > > T_STRING "Zend\Validate\Interface" but rather: > > > > T_STRING "Zend" > > T_NS_SEPARATOR "\" > > T_STRING "Validate" > > T_NS_SEPARATOR "\" > > T_INTERFACE <-- parse error > > > > I understand it's not trivial to fix this, but I wanted a clarification: > is > > there a plan to do something about it, or it'll remain an invalid syntax > by > > the time of release of 5.3. > > > > Regards, > > Stan Vassilev > > Since I don't see why anyone would want to map the name that directly in > the > first place, I don't see anything here to fix. In that example, if you > imported Zend\Validate\Interface you would then have to use it as: > > class Bob implements Interface { } > > Which is of course wrong on many levels. I'd file this under "if it breaks > when you do that, don't do that". :-) > > -- > Larry Garfield > larry@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > ------=_Part_7726_11784417.1225964118384--