Is Maxima modular?...(and/or How learn source code?...)



> Is the current code at least *MODULAR* with different parts
*ENCAPSULATED*????

No.  There is no discipline defining which functions inside one module
are visible outside that module.  Even when there is a clear main entry
point, other modules sometimes use an internal entry point for
efficiency, and sometimes the most common entry point has a name which
clearly shows it was originally intended as internal (cf. M2).  Even
when modules go to the trouble of specifying their external interface
clearly (Opers), other modules often use explicitly internal functions.
And different modules have different conventions....

I don't like the situation, but that's the way it is for now.  Little by
little, we hope to start using the CL module system to clean this up.

Global variables are also problematic.  There are two cases here:
explicitly global "mode" settings which get temporarily bound to one
value or another, and variables which are used as another way to
communicate information from one function to another.  Both are
important in Maxima.  The first kind is usually slightly documented; the
second kind is often not documented at all (though they do have to be
declared).

> How did current developers get a general handle on source code????

A lot of code reading, a little bit of tracing/experimentation, and some
email queries.

One useful technique is to keep all the source files concatenated
together for reference and easy searching in Emacs (faster and more
convenient than tags-search).  I also am writing internals documentation
and adding comments to the source little by little.

I agree that the situation is far from ideal, but that's what we have to
work with.

       -s