Scope

There are two things here where scope is relevant, object names and library paths.

object name scope

canvas-local scope

global objects

reserved words

library path scope

canvas-local paths

parent-to-children paths

global library path

Loading into a Namespace

currently, you do not need to load a library to use it with the full namespace qualifier (i.e. zexy/symbol2list always works without an import/declare

in Python, you always need to import before using it (i.e. import zexy, then zexy.symbol2list

-path vs -lib

-stdpath is very close to Java's classpath and Python's PYTHONPATH. It is the path to look for libraries and classes

-lib is very close to Java's and Python's import. It loads libraries into a namespace

relative path support in -path in tricky and unneeded if you have getdir

Loading the file versus loading the object

There are multiple forms for storing objects on the filesystem, including abstractions, single- and multi-object library files, etc. Then there is the representation of what objects are assigned to which symbols. These don't need to be the same thing. Each patch has its own table of which symbols are attached to which objects, and this can be separate from which objects are actually loaded into memory.

One idea for handling this is to have separate tables of symbols for which object files are loaded, versus which symbols are tied to which objects for a given patch. It seems for this to be workable, there would need to be a "loaded" table, then each patch would generate its table from the loaded table. Then if an object isn't in the loaded table, the loaded table handler would go and try to load it.

Namespaces for send/receive symbols

Oftentimes in libraries, some code requires global send and receives. These should use the same namespace prefix as you would to load a specific object from a specific library, i.e. [send framesync/fps]? and [receive framesync/fps]?.

Reserved words

There needs to be a small set of reserved words which are in the global namespace and cannot be overridden.