On Thu, 8 Aug 2002, Frank Barknecht wrote:
This is a nice idea and somehow it brings up the question of namespaces again. I can think of external names, "foo" is in fact a good example, that might be used in several places. We should of course avoid such name clashes, and maybe a mechanism developed for pure-data.sf.net can be a testbed for namespaces. But I have no idea, how such an architecture is best defined...
Actually the question of namespace is exactly what I wanted to bring up. AFAIK remember the last time we discussed this, it slowly faded away without a solution.
I am not sure which points where made by the people involved, but I can outline what I thought about it.
My idea at the moment is to structure externals in a directory hierarchy, just for the sake of flexibility, and Idont want to introduce some new functions to register namespaces within pd.
If this is done, every directory that is inside the $EXTERN_ROOT is considered a namespace.
The second step is that we need some ways to tell the system which namespaces we are using.
On an sigle object basis this is quite easy, because we can just use namespace/extname to instantiate. (Or we change the external loader a bit and use namespace.extname)
On a patch basis, this could be done with a object that sets a namespace ala C++ with [using namespace].
When someone wants to pull in the objects of a namespace for the whole application this could be done with a program switch ala "pd -using namespace".
The problem with the later 2 features is that if someone wants to use an external from two namespaces with the same name. So all the namespace stuff will possibly create more confusion, instead of solving the (very few) nameclashes we have.
Guenter
------------------------------------------------------------------------ Music Technology Group - UPF, Barcelona http://www.iua.upf.es/mtg/eng/ AGNULA - A GNU Linux Audio distribution <www.agnula.org> DeMuDi - Debian Multimedia Distribution <www.demudi.org>