[PD] declare vs. namespaces - current best practice

João Pais jmmmpais at gmail.com
Tue Jan 2 09:54:25 CET 2018

Dear list,

I'm trying to make my abstraction library vanilla-compatible, but
nevertheless I need to use some externals. Since I didn't keep up with the
vanilla progress the last years, I wanted to ask what is the best method to
make sure that all externals are loaded:
- use [declare ....]?
- use namespaces such as [list-abs/list1]?

I imagine that for libraries compiled into one external file the best
alternative is declare, such as with Gem: [declare -stdlib Gem -stdlib
zexy]. But for cases where the objects are separated, is there a
conceptual/political/pratical difference between declaring and using
namespaces in the object name?
(I'm used to namespaces so that I know immediately from which library the
object comes, but I can change that)

Adding to that: I'm still using mainly Pd-ext, and trying to branch out to
vanilla and purr-data. Which is the best method to try to be compatible
with these 3 distributions?
E.g. [declare -stdlib Gem -stdlib zexy] works quite well on van+ext, but
[declare -stdlib iemmatrix] doesn't in pd-ext; I must add a [iemmatrix]
object to load the library. Is this a iemmatrix bug, or the [declare]
object from pd-ext is too old?

Also: I imagine that there isn't a problem with repeated declarations?
Inside each abstraction there is a [declare], and a patch can always use
lots of them.

A suggestion: I can write [declare -stdlib xxxxx], and there will be no
error message warning that the xxxxx library doesn't exist. Would it be
good to have an error message, or even open deken to search for it?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180102/c2a8dfe0/attachment.html>

More information about the Pd-list mailing list