<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>> (is there a difference in behaviour between them?)</div>

<div> </div>

<div>stdlib is relative to the 'standard paths' whereas path is relative to the current patch.</div>

<div> </div>

<div>my point is that the user could have their libraries in a totally different place so that none of [declare -path/-stdpath/-lib/-stdlib cyclone] will work.</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Donnerstag, 04. Januar 2018 um 22:14 Uhr<br/>
<b>Von:</b> "Alexandre Torres Porres" <porres@gmail.com><br/>
<b>An:</b> "Christof Ressi" <christof.ressi@gmx.at><br/>
<b>Cc:</b> pd-list@mail.iem.at<br/>
<b>Betreff:</b> Re: Re: [PD] declare vs. namespaces - current best practice</div>

<div name="quoted-content">
<div> 
<div class="gmail_extra"> 
<div class="gmail_quote">2018-01-02 12:37 GMT-03:00 Christof Ressi <span><<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>></span>:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">what do you mean by [declare cyclone]?<br/>
<br/>
in case you mean [declare -stdpath cyclone]:</blockquote>

<div> </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 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">a) this would only work if cyclone is in the user's stdpath (which you can't know as a library writer)</blockquote>

<div> </div>

<div>why?</div>

<div> </div>

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">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" onclick="parent.window.location.href='porres@gmail.com'; return false;" target="_blank">porres@gmail.com</a>><br/>
An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>><br/>
Cc: "João Pais" <<a href="mailto:jmmmpais@gmail.com" onclick="parent.window.location.href='jmmmpais@gmail.com'; return false;" target="_blank">jmmmpais@gmail.com</a>>, <a href="mailto:pd-list@mail.iem.at" onclick="parent.window.location.href='pd-list@mail.iem.at'; return false;" target="_blank">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" onclick="parent.window.location.href='christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>[mailto:<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='christof.ressi@gmx.at'; return false;" target="_blank">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/>
<br/>
<span>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/>
 </span><br/>
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]" target="_blank">https://github.com/pure-data/pure-data/pull/205[https://github.com/pure-data/pure-data/pull/205]</a> & <a href="https://github.com/pure-data/pure-data/pull/183[https://github.com/pure-data/pure-data/pull/183]" target="_blank">https://github.com/pure-data/pure-data/pull/183[https://github.com/pure-data/pure-data/pull/183]</a><br/>
 <br/>
cheers,<br/>
happy 2018</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>