[Asdf-devel] package-system
Faré
fahree at gmail.com
Tue Apr 15 22:54:38 UTC 2014
> I’m jumping in late here, but why is this part of ASDF itself? I can see how someone might want this as an extension but it seems like the kind of thing that shouldn’t live in ASDF itself, IMO.
>
> Shouldn’t ASDF’s goal be to make this sort of extension possible/easy but not to actually implement this sort of thing?
>
That's an excellent question.
nyef and drewc convinced me that this style was a good way to
structure sizable CL programs, and my experience with asdf itself
(converted while writing asdf 2.27, aka asdf3 pre-release) and
lisp-interface-library confirm that indeed it is.
Since ASDF itself uses this style, I figure that it is proper for ASDF
to actively support this style, and maybe one day adopt it as its
bootstrap method (which I didn't do, to make transition easier, but
would have done a year or two from now).
I really like this style, ASDF uses it, and I want to promote it. I
believe that making it part of ASDF and eventually available with
every implementation can really lower the barrier to entry to writing
CL code, as compared to making it part of an external system that has
to be downloaded separately and configured specially.
At the same time, the implementation is 99 lines of code. Even nyef's
implementation, that is fully standalone and doesn't try to
interoperate with ASDF and is missing bells and whistles and
robustness and portability, is just 117 lines of code. That's a
trivial amount compared to over 8000 lines of code total in ASDF+UIOP.
(I count lines with lisp-stripper, which removes blank lines, comment
lines, docstrings, etc.) It is NOT going to hog your systems.
I see a lot of benefit for precious little cost. As far as former
extensions go, we already moved in the bundle support into ASDF
(initially for the sake of ECL, but now to the benefit of everyone)
and I believe that was extremely beneficial, so there is a precedent.
Certainly, if there is a huge backlash against including
package-system support in ASDF, I'm sure Robert will remove it. But I
strongly support the inclusion of it, and I invite you all to try this
programming style if you haven't, and even if you're still using
traditional .asd files. It can really help organize your source code.
PS: the reason I believe that package-system style is so good is that
it enforces that inter-file dependencies are explicit, and forward
references particularly so; it therefore really encourages better
factoring of code, which makes it much more readable, too. Just try to
make sense of ASDF 1.85 vs ASDF 3.0.3. The new code is so much easier
to figure out, despite doing so much more work, and that's thanks to
the package-system style. ASDF 3.0.3 is ten times the size of ASDF
1.85, but each of its file is smaller, often much smaller, than ASDF
1.85. And even maximum function size is smaller in ASDF 3.0.3 — the
amount of information you must juggle with at a same time in your mind
to grasp ASDF 3 is smaller than for ASDF 1. Yet ultimately, ASDF 3
does much more, and does it correctly. See my ASDF3 article:
https://github.com/fare/asdf3-2013/
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Life is the worst of all social inequalities. To suppress inequalities, one
must either resurrect all the dead people (and give life to all the potential
living people), or exterminate all the actually living. Egalitarians, since
they cannot further their goal by the former method, inevitably come to
further it by the latter method.
More information about the asdf-devel
mailing list