[slime-devel] [RfC] Reorganization of source

Helmut Eller heller at common-lisp.net
Sun Aug 12 08:24:31 UTC 2007


* Tobias C. Rittweiler [2007-08-11 14:32+0200] writes:

> Hi,
>
> I'd like to suggest a reorganization of the Slime sources. Some
> not-so-long time ago, there has been some vague consensus of factoring
> some parts of Slime out into a contrib/ directory. The intention of this
> mail is to straighten out the vagueness while building upon the
> consensus.
>
> I propose:
>
>   a) to introduce a new file `swank-utils.lisp' (and perhaps also
>      `slime-utils.el') and collect common utility functions there in.
>
>   Gripe: `swank.lisp' is currently almost 6000 lines long. As a
>     result, it's very hard to get an overview of what's there already,
>     and consequently what could be reused in other (or new!) parts.
>
>     Also there's some stuff that can be very useful for foreign projects
>     that perhaps would like to take advantage, but don't want all of
>     SWANK (the arglist stuff comes to mind.)    

No consensus here.  The basic structure, a few big files, should stay
as it is.

It's also not our business to support foreign projects.  If other
projects depend on Slime internals, it's their problem.

>   b) to introduce a new directory `modules/' that contain self-contained
>      subsystems. For instance:
>
>          modules/
>             inspector/
>
>             fuzzy-compl/
>
>
>      These subdirectories contain both Common Lisp and Elisp code. It's
>      subject to further discussion what's the best way of loading these
>      subsystems. Are there special requirements?

One requirement is that Slime, in the default configuration, should
also work without the modules directory.

>
>      The purpose is to reduce the line count of `swank.lisp' while
>      aiding understanding by explicitely decoupling of independent
>      subsystems. Also to establish the ground work for a plugin
>      architecture if this deems useful.

The purpose is to remove (bloated) features from Slime.  Putting
bloated code in it's own directory is a diplomatic way to remove a
feature.  The code in the modules directory is maintained (or not) by
those people who care about it; not necessarily the Slime maintainers.
Conceptually, the stuff in the module directory isn't part of Slime.

"Plugin architecture" sounds to me like "over engineered" :-)
We want something simple and stupid, like require.

>   c) to introduce a new directory `backends/' and place all the
>      `swank-sbcl.lisp', `swank-clisp.lisp' &c files there. This is
>      merely for aesthetical reasons (less clutter in the main source
>      directory) and hence rather optionally.

Similar to a).  Overall, I think Slime's file organization as it is
now is quite ok.  The problem is that some features take way to much
code.  Reorganizing files alone doesn't reduce the amount of code.
Removing features or replacing them with simpler versions does, but
that doesn't seem to be popular in the Lisp world.

Helmut.



More information about the slime-devel mailing list