Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42813 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26974 invoked from network); 24 Jan 2009 14:38:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2009 14:38:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.229 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.198.229 rv-out-0506.google.com Received: from [209.85.198.229] ([209.85.198.229:6765] helo=rv-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/BA-55096-8D72B794 for ; Sat, 24 Jan 2009 09:38:17 -0500 Received: by rv-out-0506.google.com with SMTP id g37so5244406rvb.23 for ; Sat, 24 Jan 2009 06:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bYABtw5pnyBEB8sUhFqU4ZLgfZlwZQotOvMtIH/Zw/U=; b=RvjJuX5nseuE1Kcf+frDG+t62G0by5TOzHEx5/1XRHfqxQbuTDVSKsKvj2EplukzdO PLaJBbdu+7rcyaQ7Q87Sj13veP5Liub8hB95PTMZOWoNK1kT49JI0E6fYjXvTV/JuxKU 1QzQgPJ0dNIEBc99CqwqvnTZP0JhL/bn8rLkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=NkWtCCUaHTvip8GL3STlTPSIYzhSjByvMVvfNTQfmPrBgNjZxUEyx+xEi8XkSIBSiR fprNIiiyZSpppt4fWkXVc1dy3ZXl9ioyvXbuTVemWW8nkQuZGr8IAnn2Qu95ixLviJkA D60qheubZsm8HH5T8AQ/smfn9Ja9sZ9Ma7UwQ= MIME-Version: 1.0 Received: by 10.140.173.10 with SMTP id v10mr1071885rve.199.1232807893932; Sat, 24 Jan 2009 06:38:13 -0800 (PST) In-Reply-To: <20090124000751.GA25435@mint.phcomp.co.uk> References: <497A4138.2000707@gravitonic.com> <7f3ed2c30901231537j35d3b4c2i945de77a6a14dba0@mail.gmail.com> <497A578B.4080208@gravitonic.com> <3959E78B-13FC-437E-86BE-5B9EAF575BD0@pooteeweet.org> <497A599E.8030008@gravitonic.com> <20090124000751.GA25435@mint.phcomp.co.uk> Date: Sat, 24 Jan 2009 12:38:13 -0200 Message-ID: To: Alain Williams Cc: Andrei Zmievski , Lukas Kahwe Smith , Hannes Magnusson , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Reserved namespaces From: guilhermeblanco@gmail.com (Guilherme Blanco) IMHO, the prefix will turn everything more readable... I already saw people experiencing some doubts regarding this piece of code. I had to illustrate it everything. namespace Foo; class Bar { public function test() { try { do_some_stuf(); } catch (Exception $e) { // Refers to Foo\Exception // Special handling of Foo Exception } catch (\Exception $e) { // Refers to PHP Exception // Special handling of Exception } } } I just updated the code to explain wtf is happening... but he was just trying to do a simple try { .. } catch (Exception $e) { ... } and thought it was a bug since it was refering to Foo\Exception. Sounds newbie, but you will have troubles in the future. Regards, On Fri, Jan 23, 2009 at 10:07 PM, Alain Williams wrote: > On Fri, Jan 23, 2009 at 03:58:22PM -0800, Andrei Zmievski wrote: >> Lukas Kahwe Smith wrote: >> >I think the decision was to not yet bother with reserving namespaces or >> >starting to namespace-ify extensions. We might however want to put out = a >> >naming guide for namespaces. >> >> I agree. Whether the error is raised or not on reserved namespaces can b= e >> done later, but we should explicitly indicate that certain namespaces ar= e >> off-limits. > > Could take the simple convention that exists in perl with modules. > > Module names begin with a capital letter, pragmase are lower case, thus y= ou have: > > use strict; > > use IO::File > > Nobody is made to do anything, however you loose the option to complain i= f your > namespace starts with a lower case character. > > -- > Alain Williams > Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, I= T Lecturer. > +44 (0) 787 668 0256 http://www.phcomp.co.uk/ > Parliament Hill Computers Ltd. Registration Information: http://www.phcom= p.co.uk/contact.php > Past chairman of UKUUG: http://www.ukuug.org/ > #include > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9215-8480 MSN: guilhermeblanco@hotmail.com URL: http://blog.bisna.com S=C3=A3o Paulo - SP/Brazil