[Top][All Lists]

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

Re: [Axiom-developer] Literated VMLISP.LISP.PAMPHLET

From: Kai Kaminski
Subject: Re: [Axiom-developer] Literated VMLISP.LISP.PAMPHLET
Date: Fri, 22 Sep 2006 16:34:57 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Ralf Hemmecke <address@hidden> writes:

>> %FILE 1
>> <<*>>=
>> BLIH  (Should end up in a single chunk with BLUH)
>> BLAH  (Should be in its own chunk)
>> BLUH  (depends on BLAH, ie has to come after blah in the file)
>> @
>> Now try to chunk this up given those constraints without changing the
>> order of code.
> So I don't know how reasonable that would be. Your are certainly
> better off doing it your way. But for your question....
> %FILE 2
> <<BLIUH>>=
> <<BLOH>>
> <<BLAH>>
> @
> I guess, you don't want the above chunk, because it contains too much,
> right?
Not quite. This whole BL*H thing is thoroughly confusing. I'll just
give you the real code (kind of).


(defmacro alias-for-foo (...)
  [code generating code calling foo])

(defun bar (...)

(defun define-function (alias function)
  (setf (symbol-function alias) function))

(define-function alias-for-bob #'bob)

End of File1

FOO and BOB are functions defined elsewhere. Now I wanted to put all
(most) aliases in a single chunk since they don't deserve individual
documentation. Hence the first and last forms above go into a single

(defmacro alias-for-foo (...)
  [code generating code calling foo])

(define-function alias-for-bob #'bob)

The (defun define-function ...) form has to go before that
chunk. Hence the order changes. I could have done what you suggest and
just referenced the (defun define-function ...) chunk in the aliases
chunk, but I didn't like that.

Of course, I also wanted to delete lots of whitespace and comments
anyway, so the whole point is moot.

Thanks for taking the time to discuss - admittedly boring - details.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]