Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63977 invoked from network); 4 Jul 2008 14:03:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2008 14:03:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.28 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 74.125.44.28 yx-out-2324.google.com Received: from [74.125.44.28] ([74.125.44.28:49152] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/7B-14155-0AD2E684 for ; Fri, 04 Jul 2008 10:03:13 -0400 Received: by yx-out-2324.google.com with SMTP id 3so325788yxj.83 for ; Fri, 04 Jul 2008 07:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=IsUvkxdwsLkoO+fOToht2BFp7keVKNtuqeaxxWICEB8=; b=d4HJXXqCsuZ5Ci2k/ffhPdc4bNWyfAA3m4E4SVaZv93UcgpYRvzexqXVMzEJBDJEdt C2Lo9te0tzZnKhVpK20dx8MRQW5zvW9nHtx7Wj+DuyRKSBnVU5DCOmGZ9Wl+ENpVv2mr pHT1ZLaLaxCHrMV8QKhgCBc0ygBICNuVtVSP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=CEYk+XFeOqh+CQVd8sESv42DPOyVfzvVEWR+pEmuWNDmCOTqT23j+pi5ccC+gi5oCj dnNeiYKFHxOZUC5P2Te02i6fU6t5UXfkL1moRWkT1o46qzsNTfQPjF4XOyWc5CK5OoGt 1kbATCAhjqCEXU4xmwIDPvR44qedXDG8+OPGQ= Received: by 10.150.137.8 with SMTP id k8mr2006491ybd.79.1215180190540; Fri, 04 Jul 2008 07:03:10 -0700 (PDT) Received: by 10.151.83.19 with HTTP; Fri, 4 Jul 2008 07:03:10 -0700 (PDT) Message-ID: Date: Fri, 4 Jul 2008 16:03:10 +0200 Sender: ekneuss@gmail.com To: "Lars Strojny" Cc: "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" , "Derick Rethans" , "php-dev List" In-Reply-To: <1215178480.8875.36.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1215076043.7021.10.camel@localhost> <1215160135.8875.14.camel@localhost> <1215162928.32294.5.camel@goldfinger.johannes.nop> <1215163596.8875.22.camel@localhost> <1215172604.32294.34.camel@goldfinger.johannes.nop> <1215174704.8875.32.camel@localhost> <1215178480.8875.36.camel@localhost> X-Google-Sender-Auth: ffe07988d9e63427 Subject: Re: [PHP-DEV] [RFC] Namespaces for internal classes From: colder@php.net ("Etienne Kneuss") Hi, but there is already a structure in the namings of classes, and it's already documented: " Iterators and Exceptions are however simply postfixed with "Iterator" and "Exception." Examples: " IMO this rule should still be valid in namespaces so I'd group iterators along with what they iterates on, rather than grouping them together. This will be especially useful when classes like Graph will appear, as they will have multiple different iterators/visitors. If we have to rename what we import in order to make the code clear (i.e your example about LogicException), it looks like a sign that the namespace should be named/grouped differently. Besides, I don't believe "List" is a correct term to group queue/stack/heap/.... Spl::Datastructure sounds more correct. Regards, On Fri, Jul 4, 2008 at 3:34 PM, Lars Strojny wrote: > Hi Etienne, > > Am Freitag, den 04.07.2008, 14:50 +0200 schrieb Etienne Kneuss: > [...] >> a big -1 from me on the namings >> I really see no point in having: >> >> use Spl::Exception; >> throw new Logic; > > use Spl::Exception::Logic as LogicException; > throw new LogicException(); > > Besides that, what we should keep in mind, whatever structure we define > it is likely that this structure sends an important signal towards other > projects (frameworks, libraries) and how they use namespaces. My > objection with your proposed method is, that while it fixes the problem > of clashes, it fails to structure the classes in the package "Spl". > > cu, Lars > -- Etienne Kneuss http://www.colder.ch Men never do evil so completely and cheerfully as when they do it from a religious conviction. -- Pascal