A Logician Reads Programing Manual

By Xah Lee. Date:

A logician reads a computer language manual.

package, library, module, namespace, path. Most confusing and needed concept in programing languages.

I don't think i've seen a language that defines them in some mathematically precise way. Most rely on programers to “grok” the fuzzy English sense of the words.

For example, here's Racket lisp's documentation. http://docs.racket-lang.org/guide/module-basics.html. It is one of the more precise documentation.

Each Racket module typically resides in its own file. For example, suppose the file "cake.rkt" contains the following module:

by implication, a “module” seems to be a file, for example: “candy.rkt”, or a set of files.

Then, a “collection” is:

A collection is a hierarchical grouping of installed library modules.

It's not clear what “library modules” here means .

also, the explanation given is hard to make mathematically precise sense. It seems to be a “library modules”, that are installed, and such has a “hierarchical grouping”.

So, a “collection” seems to be a set, that has tree structure, and this set's elements are modules, and each are installed.

Then, we have “packages”. The doc says:

A package is a set of libraries that are installed through the Racket package manager (or included as pre-installed in a Racket distribution). For example, the racket/gui library is provided by the “gui” package, while parser-tools/lex is provided by the “parser-tools” library.

Here, immediatly, the word “libraries” are used without a definition. So far, it's not clear which of the “module, library, collection, package” has a absolute technical meaning to the language. Or, were the definitions so far more or less for human reading, but has no meaning in Racket the language? (in contrast, provide, require, module, are keywords in the language that has precise meaning. Further, the module keyword certainly doesn't mean the same thing as the doc explained “module”.)

Emacs Lisp Situation

See here for the emacs lisp situation. Emacs Lisp's Library System: What's require, load, load-file, autoload, feature?

Clojure Situation

See: Technical Writing as Symbolic Logic: Clojure Intern Symbol

If you have a question, put $5 at patreon and message me.