[PD-dev] nameclashes

d.lj jdl at xdv.org
Thu Nov 4 21:39:01 CET 2004


hy

maybe, hm, clean up the codebase i.e. declare the most simple and robust
the main one and throw out all other versions or at least rename the
"thrown out"  versions to something like "packagename_objectname".

i saw somebody already made the effort to convert . separators to _
ones.

this will also work with the single object <-> filesystem mapping.

a flag seems overcomplicated.

bst, opt

[Tim Blechmann]->[[PD-dev] nameclashes]->[04-11-04 23:19]

 |hi all ...
 |
 |i'm currently thinking of a way to solve the nameclash problem (counter,
 |scale, prepend, gate...)
 |
 |here are some suggestions for a solution ... with some pros and cons:
 |
 |- namespaces: add the library name like library/object or
 |  library::object
 |  pros: - selectable at runtime
 |	- the patch will work exactly as you expect, since you see that object
 |	  is from library
 |  cons: - "/" is already used for the search path (shouldn't be a big
 |          problem), "::" are two chars
 |        - only works if an object is compiled as library ... if a
 |	  library is split to single externals (like the build system does) pd
 |	  is not aware of the library name
 |
 |- startup flav: having another flag like -force library/object or -force
 |  library::object
 |  pros: - easy to use
 |  cons: - you can't use both library1::object and library2::object
 |	- behaviour of the patch depends on startup flags (less portable)
 |
 |- communication: figure out, if the external name is already in use
 |  pros: - no implementation effords
 |  cons: - not really working (that's why we've got these problems *g*)
 |
 |- standard behaviour: if object1 is doing the same as object2, except
 |  that it is missing one feature, add this feature to object1, if they
 |  behave exactly the same, the nameclash isn't a problem any more ...
 |  (escept for the waste of memory)
 |  pros: - as above
 |  cons: - as above
 |
 |personally i'd prefer the communication in combination with a startup
 |flag ... but i'm curious about other ideas or comments ...
 |
 |cheers ... tim
 |
 |

-- 
x          Ð          v          .          o          7          g
GPG-key at http://xdv.org/~jdl/jdl.pub.asc




More information about the Pd-dev mailing list