Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93441 invoked from network); 31 Mar 2009 02:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2009 02:48:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 209.85.146.181 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 209.85.146.181 wa-out-1112.google.com Received: from [209.85.146.181] ([209.85.146.181:14588] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/39-40239-66481D94 for ; Mon, 30 Mar 2009 21:48:07 -0500 Received: by wa-out-1112.google.com with SMTP id j40so1451538wah.7 for ; Mon, 30 Mar 2009 19:48:04 -0700 (PDT) Received: by 10.114.197.10 with SMTP id u10mr4017782waf.96.1238467684118; Mon, 30 Mar 2009 19:48:04 -0700 (PDT) Received: from monster.local ([76.84.30.125]) by mx.google.com with ESMTPS id m31sm5111538wag.64.2009.03.30.19.48.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Mar 2009 19:48:03 -0700 (PDT) Message-ID: <49D1845B.9020607@chiaraquartet.net> Date: Mon, 30 Mar 2009 21:47:55 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Andrei Zmievski , Christian Schneider , PHP internals References: <497A4138.2000707@gravitonic.com> <7f3ed2c30901231537j35d3b4c2i945de77a6a14dba0@mail.gmail.com> <497A578B.4080208@gravitonic.com> <3959E78B-13FC-437E-86BE-5B9EAF575BD0@pooteeweet.org> <497DA729.8070206@cschneid.com> <49B99D30.2060803@gravitonic.com> <9A4A884C-CB5D-4CEF-8D23-9CD353E5F725@pooteeweet.org> In-Reply-To: <9A4A884C-CB5D-4CEF-8D23-9CD353E5F725@pooteeweet.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Reserved namespaces From: greg@chiaraquartet.net (Greg Beaver) Lukas Kahwe Smith wrote: > > On 13.03.2009, at 00:39, Andrei Zmievski wrote: > >> 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. >>> 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. >>> 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. >> >> Just a gentle reminder to make sure we don't miss this.. > > > So where are we at here? > If nobody proposes something, this will just slide by .. I propose reserving PHP. extensions can be PHP\extname (i.e. class PHP\Phar, or for extensions with multiple levels of hierarchy PHP\PDO\mysql etc.) Alternately, we forbid namespaces in extensions, and thus users can guarantee no conflict with PHP internals simply by using them. Anything else will lead to insanity very quickly. Either we'll get wonderful conflicts or no way to figure out in advance what namespaces are OK. Ilia's suggestion of reserving any extension, current or future, as a namespace makes it impossible to predict what namespaces should not be used in userspace, and as we know, extensions can have literally any name. This, in my opinion, is no option at all, as we need to be able to know whether names we choose can be safely used with future versions of PHP. Greg