Re: More questions about exported symbols and general style.



Bill Atkins wrote:

"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.

I had no idea people would hate that so much. I guess I know now why I
don't see more of it. :^)

Anonymous and even nonymous functions in other languages often work
this way. It was a pretty conscious imitation of what I like about
Mathematica's anonymous function syntax.

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.

I do like that better than the AIF, et c., so I may well *yoink* it for
myself. Still, it's tough to resist the terseness for anonymous
function declaration....

Cheers,
Pillsy

.



Relevant Pages

  • Re: More questions about exported symbols and general style.
    ... up bindings to captured variables (like IT in anaphoric macros) in ... names magically spring into existence without visible bindings is not ... but I do have various function-creating macros inspired by /On ...
    (comp.lang.lisp)
  • Office 2003 - Turn off macro disabled message
    ... it to use macros when printing (even though there are some in the ... high security and both of those physically tell me the macros have ... Would hate to have to sit there and click OK several ...
    (microsoft.public.office.setup)