[PD] name collisions, namespaces ..
czaja at chopin.edu.pl
Wed Aug 28 19:02:16 CEST 2002
my point was mainly about lazy users putting plain [matrix~] in
a patch, and then other users opening the same patch in a Pd
session having different library loaded. So the whole namespace
idea would fail, unless the library marking is saved in a patch,
even if it is not visible in an object box. Thus, the needed
changes to the Pd design and coding involve more than simply
modifying the library loader.
But there is yet another point -- about users just being puzzled
by various meanings of simple words such as 'matrix~' or 'counter'.
Btw, matrix~ is an msp class too (however not in the cyclone yet).
From this probably follows (but it is not for me to judge), that
this name could very well become 'reserved' for a 'compatibility'
IOhannes zmoelnig wrote:
> Well, my idea is to make namespaces handled by the library loader of pd.
> This is, the namespace is not handled by the programmer.
> She just writes a library (pe "zexy") and with classes like "matrix~".
> When the pd-library-loader loads "zexy", it inserts the new classes not
> as "matrix~" but as "zexy::matrix~" (please ignore the ascii-value of
> the delimiter) and furthermore tries to add a class_creator "matrix~",
> which is allowed to fail, because someone has ignorantly written a
> library "matrixlib" that provides the "matrix~"-class and has been
> loaded before.
> so i would encourage programmers of libraries to not use (artificial)
> namespaces for their classes until...
More information about the Pd-list