[asdf-devel] Minor simplification

Faré fahree at gmail.com
Sat Feb 5 18:17:41 UTC 2011


>> Do you need to change it dynamically? Why not just have a static #+ecl
>> or something? don't understand the use case.
>
> Yes, it has to be changeable if the user decides to switch compilers, for
> whatever reason. To name one, Windows users will get by default a bytecodes
> compiler shipped in, and will have to switch to the lisp->C compiler at run
> time if they have MSVC around (which is rarely the case). And the converse
> should be possible: Linux users could have lisp->C preloaded and switch to
> bytecodes compilation for a session. All this should be doable with the same
> ASDF image.
>
What about instead having a conditional based on a special variable
(that probably already exists in some ECL guts) to decide whether to
compile using one method or the other at runtime? e.g.
  (if ecl:*use-bytecode-compiler*
     ...
     (call-next-method))

> As you see, it would even be better to have a global variable
> ASDF:*COMPILE-FILE-FUNCTION* specify who does what instead of having us mess
> with function definitions.
>
I'm still not convinced.

>> Since all this is ECL-specific (so far), I suppose you could use
>> ADVISE, or whatever ECL-specific hooking mechanism exists, or
>> delete-method calls.
>
> But do you realize, that precisely because this is very ECL specific, there
> is no need to complicate COMPILE-FILE* and the way we have to interfere with
> it.
>
I personally think that setf fdefinition is pretty complicated already.

> Design of ASDF should expose only a minimal, well thought out API. Making
> COMPILE-FILE* a generic function, when the types of arguments is fixed, just
> for the sake of :AROUND methods is absurd. It forces non portable code (I
> call MOP nonportable) just to change/delete a feature.
>
A :around method is a portable way of achieving the result (no MOP required),
and since you're method is #+ecl there is no problem with non-portability
in changing/deleting the feature. Though once again, a conditional is
probably better called for, since it just works without the user having to
make sure he calls hooks after modifying a variable.

> If you want me to put it another way. The patch I submitted was just to get
> rid of an :AROUND method, and you just forced me to add another one + MOP
> code in my own system.
>
Since you're only showing me half the code, I can't judge. As far as the
code I'm seeing and maintaining goes, I made my judgment.

> Please, reconsider this,
>
Please show me your code if you want me to reconsider.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
In a culturally confident age, the British in India were faced with the
practice of "suttee" — the tradition of burning widows on the funeral pyres of
their husbands. General Sir Charles Napier was impeccably multicultural: "You
say that it is your custom to burn widows. Very well. We also have a custom:
when men burn a woman alive, we tie a rope around their necks and we hang
them. Build your funeral pyre; beside it, my carpenters will build a gallows.
You may follow your custom. And then we will follow ours."




More information about the asdf-devel mailing list