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 <[EMAIL PROTECTED]> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php