I admit that my long term plan is somewhat different: to do
substantial developements at Spad level. That means for example
better file handling on Spad level. Of course, there is question
how much time Spad plan will take? FriCAS has more than 15 years
and there is still a lot of Boot code, so realistically we can
not expect fast change here. OTOH Spad code is slowly, but
steadily growing, Boot and Lisp oscilate at around fixed level,
new things are implemented but also things are removed or moved
to Spad code. _My_ main focus when working on Boot code it to
prepare transition to Spad. More precisely, IMO big advantage
of Spad code is that it forces clearer structure. And main
difficulty is that current Boot code has rather convolved
structure, for example code is reused in strange ways. Main
intent of changes to Boot code is to claryfy structure. When
structure is clear enough, then transition to Spad will be
relatively easy.
Concerning tiering in 'src/interp', this subdirectory contains
several subsystems:
- runtime support for Spad
- interpreter proper
- HyperDoc
- Spad compiler
They share various part. For example part of type handling is
shared between Spad compiler and interpreter. IMO ideally
there would be common type handling. Currently file handling
and scanner are common to interpreter and Spad compiler, but
pile handing is partially common (Spad compiler has a special
part), parsers are separate. HyperDoc partially uses common
type machinery but parts are special and use separate
databases ('libdb.text', 'comdb.text').
Some sharing is undesirable, but IMO to avoid massive code
duplication we should have significant code sharing between
subsystems. Which IMO means that trying to divide this between
directories is mostly futile: when working on single issue
probably one will have to look both at code specific to
given part and at shared code. So either we would have split
into many very specific directories and most work will involve
multiple directories, or directory structure will be in loose
relation to functionality. To say it differently, I feel
that having single 'src/interp' is better than alternatives.
Note that file names try to indicate subsystem: 'br-*' are
main HyperDoc files 'bc-*' are builtin HyperDoc pages,
'i-*' are interpreter files, but shared functinality makes
this division fuzzy.
To put it differnely, I think that we should try to make sure
that given part works with appropiate "types" and in particular
that reuse respect types. Main cause of problems with reuse is
that diffent users of given functionality have different structure
of data (effectively different "type"). Boot does not have
type declarations, but one possible way forward is to add assertions,
that is signal errors when data has unexpected structure.
Coming back to your specific question, we can add new file
for utility type routines, but I do not expect such file to
get big and I prefer to keep 'src/interp' as a flat directory.
--
Waldek Hebisch