Re: true namespaces, yet another point of view

From: Date: Thu, 25 Sep 2008 17:09:08 +0000
Subject: Re: true namespaces, yet another point of view
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-40687@lists.php.net to get a copy of this message
> > or just leave the organization of things to classes (with long class > names with a nice prefix to prevent collissions) and leave it to > class_alias() (and equivalent features for functions .. also with the > option of a compile time aliasing) to handle the aliasing. > > this removes the need for namespaces and use statements, while making it > possible to make class/function names short (that are long for > organizational and collision prevention reasons). > > regards, > Lukas Kahwe Smith > > No, you can't use classes for this. They can't contain the other classes and you can't have a class spanned across several files. There are some other important differences from the compiler perspecives, but still namespaces and classes are containers and you can access their members with exactly the same syntax constructs so it's not only possible but reasonable to implement them very close to each other, as I suggested in one hashtable. As a side effect it will remove the problem with class vs namespace ambiguity. JV

« previous php.internals (#40687) next »