Well, I think the best behavior is what Gem does. When one does [declare -lib Gem], the path is automatically added to search paths, so one can access all abstractions and help files without doing [declare -path Gem]. I know that it is still recommended to do [libname/libabstraction] when using abstraction libraries like [list-abs], instead of doing [declare -path list-abs], for clarity purposes. 

But still, at least I think that 'declare' works in plain english like: [declare] == 'i will be using this library from now on, so load it entirely'. Of course the problem is that some libs are made of abstractions only, some of separated objects, and others are single binaries. How libs are made depends on the lib maintainer, not on pd, of course. So, if one does [declare -lib list-abs], indeed nothing happens, like [declare -lib hid]. 

Perhaps telling the user how to load the library could (also) be deken's job after downloading a library: a simple post to console to tell the user how to load the library based on the package contents... 

On Mon, Oct 7, 2019 at 3:11 PM Christof Ressi <christof.ressi@gmx.at> wrote:
Hey,

> but only if the external is within a given serach path on PD startup.

Which is also true for [declare -lib] - it can't magically find libraries without having the correct search paths. Note that for every external "foo" the loader also tries "foo/foo", so [declare -path hid] is not necessary, you can just do [hid]. I don't see any purpose for [declare -lib hid] except maybe for documentation (but then I would just write a comment).

> > i guess Peter was saying that he only loads libraries/externals
> explicitly when they are needed.

I don't get it. When I do [hid] - without [declare -lib] -, it will be exactly loaded when needed.

Christof

> Gesendet: Montag, 07. Oktober 2019 um 14:50 Uhr
> Von: "oliver" <oliver@klingt.org>
> An: Pd-list <pd-list@mail.iem.at>
> Betreff: Re: [PD] declare not posting library loading message while object creation does?
>
> Christof Ressi wrote:
> >> And this was sarcasm too.
> >
> > damn, my sarcasm-O-meter failed miserably...
> >
> >> I was using [declare -lib hid] because this is how I load libraries in general.
> >
> > "-lib" is only needed for multi-object-per-binary libraries, e.g. zexy and iemlib. [declare -lib hid] doesn't do anything useful, the external will be loaded anyway when you create it the first time...
> >
>
> but only if the external is within a given serach path on PD startup.
>
> i guess Peter was saying that he only loads libraries/externals
> explicitly when they are needed. (which is a good practice for testing
> purposes or prior to posting/sharing patches)
>
> in the case of [hid] (or [hidin] on windows) it would be [declare -path
> hid] though, since (as christof correctly said) it's a single external
> rather than a multiobject library (like ZEXY, IEMLIB, IEMMATRIX, GEM).
>
> best
>
> oliver
>
>
>
>
>
>
> _______________________________________________
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list


--
fdch.github.io