[PD] declare vs. namespaces - current best practice

tim vets timvets at gmail.com
Thu Jan 4 13:12:13 CET 2018

On Jan 3, 2018 10:24 PM, "Derek Kwan" <derek.x.kwan at gmail.com> wrote:

"Christof Ressi" <christof.ressi at gmx.at> writes:

>> and usually involves sort of prefixing or suffixing for every
>> abstraction/external.
> I've also done this in the past.
> namespacing by prepending the folder name has one advantage, though:
> it provides you the possibility to choose between the long (safe) and
> short (unsafe) name. short names are convenient in rapid prototyping
> while long names are preferable if things ought to be robust.
> but after all, it's a matter of taste I guess.

Interesting. I suppose this makes me think about more robust and defined
examples of namespacing. Taking python for instance where you can import
modules with shorter names with something like "import numpy as np" so
you can just type "np.array" instead of "numpy.array" each time or you
have the option to dump everything into the  global namespace which is
similar to the situation we have currently of just importing the path or
compiled library wholesale through "from numpy import *".

I'd imagine that implementing a system like this in Pd would be very^999 far
from trivial to implement, cause more confusion to the general end-user
than it's worth it just because users like me don't want to type
[cyclone/*] out every time (and there is already enough confusion about
not being able to instantiate anything in Gem/zexy/cyclone/etc.  even though
they've already installed them onto their computers), and probably break
everything which would be a huge no-no..................... but it is
interesting to think about =P.


maybe I'm stretching the topic here, but, how about tab-completion?

Derek Kwan

Pd-list at lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180104/dbec4476/attachment.html>

More information about the Pd-list mailing list