Complete and naked files

abstract: There is often a confusion created by files which are ready to process and files, which contain only parts and need completion. For example 'tex' files can be just bodies, or snippets for a preamble, or complete for processing with a latex engine.

Complete and naked files

In many cases a file is marked with an extension be of a type which can be processed by a specific program. Examples: programs for GHC have extension 'hs' or 'lhs', text to be processed by a latex engine has 'tex' etc.

The same extensions are also use to indicate files which contain text written in the repsective languages and can be combined with other such pieces to form an input for the respective program.

Examples: A text for processing by a latex engine must have a specific structure. The snippets which await combination cannot be processed.

My focus at the moment is only the separation of objects which are complete, ready to go and snippets in the same language, which must be combined before they are complete.

It seems proper, to mark complete objects with types, marked with the ordinary extensions; the snippets could be marked wtih combinations. E.g. tex snippets as texsnip (or texpre for pieces which must go to the preamble).

Pattern: One plus many of many

I sense there is a pattern, where things are composed of one starter followed by several similar things, perhaps generalized to one starter composed by several things which are composed themselves - a tree structure.

There must be two operations: a linearize and a unlinearize (a parser).

How much can be gained by promoting this structure and generalized operations to linearize and unlinearize?

Produced with SGG on with master5.dtpl.