<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-01-02 12:37 GMT-03:00 Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">what do you mean by [declare cyclone]?<br>
<br>
in case you mean [declare -stdpath cyclone]:<br></blockquote><div><br></div><div>I meant adding a library as path or a lib, either in -stdpath / -path / -stdlib / -lib  (is there a difference in behaviour between them?)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
a) this would only work if cyclone is in the user's stdpath (which you can't know as a library writer)<br></blockquote><div><br></div><div>why?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
b) it only adds the cyclone folder to the search path. writing [gate] is a gamble because iemlib could be earlier in the search path (or the single binary library could've been loaded).<br>
 <br>
<br>
Gesendet: Dienstag, 02. Januar 2018 um 15:58 Uhr<br>
Von: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>><br>
An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>><br>
Cc: "João Pais" <<a href="mailto:jmmmpais@gmail.com">jmmmpais@gmail.com</a>>, <a href="mailto:pd-list@mail.iem.at">pd-list@mail.iem.at</a><br>
Betreff: Re: [PD] declare vs. namespaces - current best practice<br>
<br>
questions<br>
 <br>
2018-01-02 8:02 GMT-03:00 Christof Ressi <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[mailto:<a href="mailto:christof.ressi@gmx.at"><wbr>christof.ressi@gmx.at</a>]>:Hi, I think in your case you shouldn't need [declare] at all. [declare -stdlib somelib] makes the assumption that 'somelib' is installed in one of Pd's standard paths. This was maybe true for Pd extended where all libraries were in the /extra folder but actually it could be any other folder (which the user added to their search paths).<br>
<span class=""><br>
IMHO, best practice is to explicitly list your dependencies and have the user set them up correctly.<br>
<br>
regarding namespaces:<br>
<br>
In an abstraction library I would always use them if I can (unfortunately it's not possible with externals which are part of a single binary library). It eliminates the possibility that a wrong abstraction/external is called. My favourite example:<br>
Say that for some weird reason you're using [gate] from cyclone. If a users happens to have iemlib earlier in their search path, all your abstractions will have iemlib's [gate] object instead - which works exactly the other way around! This actually happened to a friend of mine :-D.<br>
 <br>
won't [declare cyclone] force a priority of it over iemlib? If not, shouldn't it?<br>
 <br>
</span>now, for related discussions on declare/standard paths, see <a href="https://github.com/pure-data/pure-data/pull/205[https://github.com/pure-data/pure-data/pull/205]" rel="noreferrer" target="_blank">https://github.com/pure-<wbr>data/pure-data/pull/205[https:<wbr>//github.com/pure-data/pure-<wbr>data/pull/205]</a> & <a href="https://github.com/pure-data/pure-data/pull/183[https://github.com/pure-data/pure-data/pull/183]" rel="noreferrer" target="_blank">https://github.com/pure-<wbr>data/pure-data/pull/183[https:<wbr>//github.com/pure-data/pure-<wbr>data/pull/183]</a><br>
 <br>
cheers,<br>
happy 2018<br>
</blockquote></div><br></div></div>