Thursday, January 17, 2019

Making namespaces simpler

I propose to allow modules to name their entry point after their module name, unless other wise specified. So xchars and io and symbols go in as built ins under their names.  That allows us namespace separation everywhere, no matter how we link the module, we avoid name conflicts, each has a unique name, starting with a simple filename identifier.

I am going to adopt that standard, I think we get namespace up to enterprise level because entry points are unique, locally, everywhere. The entry points defined by file name, filenames identify unique snippet functions. The module name becomes first class variable, everywhere. The search engine will associate those names with any general 'entry' call. 

Therefore, even though each module is uniquely identified all through the build and deploy, it still responds to general search. But all may be uniquely found i the symbol table. Essentially, the console loop operates a lazy default name space search, but because of uniqueness, snippets can take the fast path.

This is actually  bug fix, I was not covering this part and sort of forgot. But I have it fixed in my code, andit removes the one compile switch. Now, anything can be linked in FPIC mode.  When one module loads another, at link time or run time, it hides the entry point from the console loop, which is what we want. There will be no conflict if the same module is loaded by itself, our naqme space protocol removes that conflict, we go through the console loop search which maintains constant, unique name paths..

For example, if you do not like my io machine, make a better one, call it io, and everything should almost work right. The almost is the one or two glitches caused by you or me that are easily found in snippet codes with supposedly identical interfaces. But likely, standard protocols for linux command strings solve that.

No comments: