[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why is tree-shaking hard?



Wouldn't it be a better approach to start with a tiny kernel and
only load what is needed, instead of loading everything and then
trying to get rid of everything?

I'm probably wrong, but it would seem easy enough for Digitool
to produce a "minimal" version of MCL with just enough stuff around
to be able to do a FASLOAD.  Then they could build the rest
in layers on top of that, with the programmer allowed to
mix and match packages to load. The compiler would not have
to be distributed in this form, only as part of a completely
loaded development environment.

As a guess, the following packages might be big enough to be
worth leaving out, and *might* be separable enough to keep separate.

Fred.
The compiler.
Bignums.
Much of the fancy math stuff (atanh etc.)
CLOS
VIEWS/WINDOWS (so you could build a small headless server.)
All debug support.
Etc.

The objective would be to break up the 1500K base MCL
appliction into about a dozen major pieces plus a kernel.
Then you might be able to build an MCL app. that would be
around 800K-1000K, instead of about a 2000K minimum.

On the other hand, would it really be worth it? You won't
get a 200K application out of MCL no matter what; it just was
not designed for that purpose. (Try XLISP instead, which was.)
And any major program is going to need all of the functionality
that MCL supplies anyhow. After all, the real value of Lisp is
when you are building very large, and very complex programs,
which is, I think, the future of programming.

-Chris Eliot