Re: Crazy macro



"Drew McDermott" <airfoyle@xxxxxxxxxxxxxx> writes:
[...]
So, we need a way to avoid Vietnamization while preserving the fact
that we're reading a single piece of code. Here's where the macro
comes in. It's called 'control-nest.' A call looks like this:

(control-nest
:tag1
exp1[:tag2]
:tag2
exp2[:tag3]
...
:tagN
expN)

(tagbody
:tag1
exp1[(go :tag2)]
:tag2
exp2[(go :tag3)]
...
:tagN
expN)

Did you really need a new macro? What do you win? Avoiding to write (GO )?


Recently on cll, we presented a macro with something more than a mere
tagbody: in addition to the control flow, it links the data flow.

http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/a8c3d95939adc6aa/a712e4d464bb9945?lnk=st&q=functional-pipe+group%3Acomp.lang.lisp+author%3APascal+author%3ABourguignon&rnum=1&hl=en#a712e4d464bb9945

(functional-pipe
(lambda (item) (elementp x (funcall neighborhood item)))
(print :hi)
(remove-if-not ** items)
(mapcar neighborhood *)
(reduce (function intersection) *)))

--
__Pascal Bourguignon__ http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush
.