Arc Forumnew | comments | leaders | submitlogin
2 points by cooldude127 6118 days ago | link | parent

i'm not certain whether this would be abuse of function composition or not. for some reason, maclet and macwith just seem more appropriate than mac:let and mac:with. also seems sort of dangerous to override such an important construct.


1 point by almkglor 6118 days ago | link

My concern is largely namespace pollution. By overloading (NOT overriding) 'mac, we squeeze this feature into a smaller namespace, adding 0 new macros ^^. In any case, the arc-wiki 'breakable and 'p-m macros have a similar intended use too ^^.

-----

1 point by nlavine 6118 days ago | link

It does seem like you're going to want to do a lot of macro composition where you only compose over the body argument. Is it possible to make this work? The most obvious way for me is to use the single-argument function syntax, but somehow modified for macros, like this:

([let x 3 _]:pm:body)

This is just a really quick thought. Any comments?

-----

1 point by almkglor 6118 days ago | link

Sorry, I don't understand your question. ~.~? !.! T.T

Internally, Arc transforms (foo:bar niz) to (foo (bar nitz)), so if 'foo is a macro, it will see an argument of (bar nitz)

-----