Re: More questions about exported symbols and general style.
- From: Bill Atkins <not-a-real-email-address@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Dec 2006 13:38:32 -0500
"Pillsy" <pillsbury@xxxxxxxxx> writes:
I have considered this argument. I almost never use AIF, ACOND and the
like, but I do have various function-creating macros inspired by /On
Lisp/, like
(fn (+ $1 $2)) => (lambda ($1 $2) (+ $1 $2))
Ewww.
Upside: yes. Downside: they *have* to do that choosing, and since most
of my reliance on anaphora and such is in macros that make anonymous
functions, having visually weird magical bindings makes it easy to see
at a glance which variables are being closed over.
Personally, I prefer macros that bind to explicit variables:
(when-let (message (read-next-message *the-connection*))
(format t "~&Got message: ~S" message))
You can define a whole suite of these: IF-LET, COND-LET, etc. (or
BWHEN, BLET, BCOND). They aren't much longer than their A*
equivalents and you get to avoid all the sticky side effects of using
anaphoric macros.
.
- Follow-Ups:
- References:
- More questions about exported symbols and general style.
- From: Pillsy
- Re: More questions about exported symbols and general style.
- From: Zach Beane
- Re: More questions about exported symbols and general style.
- From: Pillsy
- More questions about exported symbols and general style.
- Prev by Date: Re: flattening a nested list functionally
- Next by Date: Re: More questions about exported symbols and general style.
- Previous by thread: Re: More questions about exported symbols and general style.
- Next by thread: Re: More questions about exported symbols and general style.
- Index(es):