Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41710 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61739 invoked from network); 6 Nov 2008 10:12:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 10:12:58 -0000 Authentication-Results: pb1.pair.com header.from=robert@typo3.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=robert@typo3.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain typo3.org from 217.72.131.73 cause and error) X-PHP-List-Original-Sender: robert@typo3.org X-Host-Fingerprint: 217.72.131.73 mail.elios.de Linux 2.6 Received: from [217.72.131.73] ([217.72.131.73:41730] helo=mail.elios.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/75-35522-723C2194 for ; Thu, 06 Nov 2008 05:12:56 -0500 Received: from [192.168.178.31] (p548CFDE1.dip.t-dialin.net [84.140.253.225]) by mail.elios.de (Postfix) with ESMTP id 083D0F54150 for ; Thu, 6 Nov 2008 11:12:28 +0100 (CET) Message-ID: <2DF8BB5E-CE72-48A1-BE12-93D1CE999FFC@typo3.org> To: PHP Developers Mailing List In-Reply-To: Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-1-698553576" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 6 Nov 2008 11:12:52 +0100 References: <4EA88C3A8A2747989925A5D21448FCE7@pc> <200811052154.29537.larry@garfieldtech.com> <98b8086f0811060150p2fb0312dj66896cb227c871ec@mail.gmail.com> X-Pgp-Agent: GPGMail d51 (Leopard) X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? From: robert@typo3.org (Robert Lemke) --Apple-Mail-1-698553576 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Dan, Am 06.11.2008 um 11:03 schrieb Dan: > 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. we also had lots of classes like "F3\MVC\Controller\Interface", "F3\MVC\Controller\Default" etc. ("default" is also a reserved word unfortunately). So we had to rename all these classes and interfaces. After doing that though, I think it's much better this way. IMO a class name should speak for itself even without namespaces, the namespaces should only put into a certain context: "DefaultController" is a default controller. "F3\FooPackage\Controller\DefaultController" is the default controller of the FooPackage, "F3\BarPackage\Controller\DefaultController" is the default controller of the BarPackage etc. So, even though I was annoyed having to refactor so much code, I am now happy with the results. Cheers, robert --Apple-Mail-1-698553576 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFJEsMlDu+3qCHvGSIRArWNAKCudtOQTkdiWY1AyaRLLKOFewW3LgCdGuOL zm4OC6B1W6D3+cgpCY07E/E= =85ae -----END PGP SIGNATURE----- --Apple-Mail-1-698553576--