On Nov 6, 2008, at 7:36 AM, Frank Barknecht wrote: > Hallo, > Chris McCormick hat gesagt: // Chris McCormick wrote: > >> This problem has been 100% solved already: >> >> <http://www.network-theory.co.uk/docs/pylang/importstatement.html> >> >> The described way of doing things is a win-win for developers and for >> users; both get maximum flexibility. I can't think of any good reason >> why we are still debating this and [declare] and [import] on this >> list. > > However: as I understand Miller's intentions, [declare] is not meant > to be the same as [import]! [declare -*path] modifies the full Pd > search path, which includes the search path for files that are not > objects, e.g. soundfiles with no complete path for [soundfiler]. > [import] however - if I understand Hans' intentions correctly - only > modifies the object search path and loaded libraries.
Minor correction: canvas-local namespace and global namespace, instead of "object search path". Or you could say, per-patch search path, etc. I think python is a decent model, but I think the namespace/import stuff in Python is too complicated for Pd. Here's how I think it should work: - canvas-local namespace per patch and global namespace - the namespaces should be consulted whenever creating an instance, not only when loading a class. That means that if I [import zexy] then use [drip], [drip] won't work in a new patch since 'zexy' hasn't been imported into that class namespace. - the exact same mechanism should be used for all objectclasses, there should be no distinction here between "internal" and "external" in terms of the library format and the namespace (except, of course, a small set of "builtins" or reserved words). I think that this override stuff will be quite confusing to keep track of and use. Plus it'll require reversing the order of the lookups. .hc > > Ciao > -- > Frank Barknecht Do You RjDj.me? _ > ______footils.org__ > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> http://lists.puredata.info/ > listinfo/pd-list ------------------------------------------------------------------------ ---- If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it. - Thomas Jefferson _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
