Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42849 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52118 invoked from network); 26 Jan 2009 12:27:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2009 12:27:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 213.152.38.186 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 213.152.38.186 freshmint.phcomp.co.uk Linux 2.6 Received: from [213.152.38.186] ([213.152.38.186:60245] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/9F-55096-43CAD794 for ; Mon, 26 Jan 2009 07:27:38 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1LRQYq-0004gR-0u; Mon, 26 Jan 2009 12:27:28 +0000 Date: Mon, 26 Jan 2009 12:27:28 +0000 To: Christian Schneider Cc: Lukas Kahwe Smith , PHP internals Message-ID: <20090126122728.GE7838@mint.phcomp.co.uk> References: <497A4138.2000707@gravitonic.com> <7f3ed2c30901231537j35d3b4c2i945de77a6a14dba0@mail.gmail.com> <497A578B.4080208@gravitonic.com> <3959E78B-13FC-437E-86BE-5B9EAF575BD0@pooteeweet.org> <497DA729.8070206@cschneid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <497DA729.8070206@cschneid.com> User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] Reserved namespaces From: addw@phcomp.co.uk (Alain Williams) On Mon, Jan 26, 2009 at 01:06:01PM +0100, Christian Schneider wrote: > Things gettings reserved at a later stage (like originally keywords, now > namespaces) can lead to a big deal of frustration. Therefore I think it > is crucial to have a clear naming guide now. +1 > And these guidelines have to be noticed by everybody who starts to use > namespaces so they have to be placed prominently. > Personally I'd even prefer them to be enforced in code so they can't be > missed. No: * there are occasional times when rules might want to be broken * to enforce it just makes the language/compiler bigger * If it is advertised and someone breaks the rules - then it is their problem. > Removing restrictions later on causes less trouble so I wouldn't mind > too much if a couple of namespaces (or namespace prefixes) are reserved > but never used. As I suggested, do it the way that perl does: it is keyed off the case of the characters. So, the reserved spaces could be one of: 1) entirely lower case (or perhaps just start with lower case) 2) entirely upper case 3) start with an underscore ('_') Perl does (1). It might be better to do (2) because system variables tend to be in upper case anyway (think: $_GET). (3) also has the virtue that system things tend to start with an underscore. This scheme is nice and simple. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include