Skip to content

New slimmer R

2 messages · Jonathan Rougier, Brian Ripley

#
Hi Everyone,

I know that Kurt is thinking about slimming down the core functions of R
and putting more stuff into libraries.  I was wondering if, as a first
step, thought had been given to re-organising the source code to
separate out the S-language functionality from the base package
functions. I am thinking in particular of the subdirectory src/main
which contains both top-level files such as "memory.c" and base-package
files such as "optim.c".  Would it not be clearer to mount the base
package entirely on src/library and so put the required C files into the
subdirectory src/library/base/src (which currently does not exist)?

Cheers, Jonathan.
#
On Tue, 9 Oct 2001, Jonathan Rougier wrote:

            
Not really.  If base remains a package, then base.so would have always to
be loaded, and no reduction would result.  Also optim() etc are
implemented via .Internal, and at present .Internal functions (and
primitives) are determined by a compiled-in table.  So the net result
would a lot of work, slower loading and probably a net increase in the
size of the running image.

It seems to me that slimming-down will only work (well) once we can split
base into a number of sub-packages which are auto-loaded as needed (not
necessarily by the autoload mechanism), and namespaces will be useful when
going along that route.   Most of the space we could save is R code, not
compiled C code.   I introduced modules to save much of the latter.

Brian