[asdf-devel] BUILD-OP

Faré fahree at gmail.com
Sun Mar 16 03:55:17 UTC 2014

>>: Faré
>: Robert

> Well, but consider this hypothetical person who doesn't know what's
> going to happen and who isn't familiar with ASDF already.
> S/he types (asdf:make "foo") and *either* gets foo loaded into his/her
> lisp image or.... an executable file gets dropped onto his/her disk?
Whichever makes sense for the given system, and that's the feature:
the user doesn't have to know which newfangled operation the system is using,
that will do the Right Thing™.
Once again, the person who knows the Right Thing™ is the system author,
so they get to specify the operation via :build-operation.
The user calls (asdf:build "foo") or (asdf:make "foo"),
and the Right Thing™ happens.
The user justs want to use the system and gets it to do its thing.

> This is going to be confusing no matter *what* word we use.
Or *unconfusing*: the user doesn't need to first dig into the README
to figure out which is the correct operation to use.

> I can't imagine why we would want to have a command that is "either
> build or run or do something else with this system."
It's just like "make" running with the first target when not given a target.
It just does The Right Thing™, and the user doesn't have to look at the README
or at comments in the Makefile to figure out what that is.

> To be honest, I am not too hung up over this proposed command, simply
> because I can't imagine myself ever wanting to use it instead of
> LOAD-SYSTEM, because I don't see the utility of issuing a command that
> will do something that I don't know and can't predict.  Or more
> accurately, that MIGHT do what I expect and might do something radically
> different.
It's not something you can't predict, it's "the Right Thing™ for this system".
And the user probably can tell what that thing should be,
since he's using the system. If they specifically want to load it
and not do that "Right Thing™", they can already use load-system.

> It seems like you have two objectives with this build operation:
> 1.  Have a default command.  This seems primarily useful for systems
> that will *not* be loaded, and where the user expects something else to
> happen.  In that case, it seems to me we would be better off NOT making
> this mostly be an alias to LOAD-SYSTEM.  If LOAD-SYSTEM is the right
> thing, we should just tell ASDF to load the system.
A non-default default is indeed only useful when the default default
isn't the thing to do, and the point is precisely that the user
doesn't need to know which is which.
Maybe the system defines a new variant of load-op,
and specifically wants to be loaded with that instead of load-op,
or maybe it wants to initialize some server connection, etc.

> 2.  Make a *shorter* alias to LOAD-SYSTEM.  This seems to me to be a
> different objective than #1, and I'm not sure trying to achieve both
> with a single new addition to ASDF is The Right Thing.
That's indeed a different thing. I'm advocating #1 for the same reason
that "make" has a default target, the first one.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Any time you're asking the user to make a choice they don't care about,
you have failed the user — Jeff Atwood

More information about the asdf-devel mailing list