[PD] Obscure pd externals in search path shadow .pd files in current working directory

Stephen Sinclair radarsat1 at gmail.com
Sat Sep 1 16:40:50 CEST 2007


> There should be some way in Pd to throw out objects by name... I'm still trying
> to figure out how to deal with name conflicts so that nobody ever gets
> burned :)

In a way it might be nice to have some concept of "namespaces", such
that objects can be referred to simply by name, or alternatively by
prefixing their namespace.

You could refer to the object "seq", hoping that it is the only one
available, but a more diligent programmer might be able to refer to
the same object as "hammer.seq", or "cyclone.seq".  (Perhaps the C++
"::" operator might be better so as to avoid conflicts with file
extensions.)  I suppose though that you can already do something like
this by using paths creatively, but having the namespace information
embedded in the actual object instead of relying on directory
structures might also be useful.

For abstractions, the main Pd patch could include an object called
"namespace" that specifies the namespace information for that
abstraction?

I guess a downside is that in both cases, the object would have to be
loaded before being able to identify whether or not it matches the
given namespace.

I'm not sure if this has been previously suggested, so I apologize if
I'm repeating an old problem..


Steve




More information about the Pd-list mailing list