Re: More questions about exported symbols and general style.





Zach Beane wrote:
"Pillsy" <pillsbury@xxxxxxxxx> writes:


Well, two questions about exporting symbols, really. Say I want to set
up bindings to captured variables (like IT in anaphoric macros) in
packages that I'll be using. Do I want to just export IT and friends,
or should I walk through the code and replace them with gensyms or
something?


This is a bit of a tangent, but: don't write anaphoric macros. Making
names magically spring into existence without visible bindings is not
very Lispy.

Damn! Now I have to stop using special variables and symbol-macros?!!

OTOH, yes, i can see how using 'self' or 'this' to refer to the-instance-at-hand would be totally dumbfounding to the reader...

Thank God the authors of LOOP never got so unlispy as to allow "collect it"!!!

The point being that tightly-constrained stuff such as the above counterexamples are thoroughly unmagical and concomitantly readable.

(the bigger problem being anyone daft enought to nest anaphors and want some outer binding of it to hold.)

kt


--
The Dalai Lama gets the same crap all the time.
-- Kenny Tilton on c.l.l when accused of immodesty
.



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)
  • Re: More questions about exported symbols and general style.
    ... This is a bit of a tangent, but: don't write anaphoric macros. ... names magically spring into existence without visible bindings is not ... but "magically springing into existence without visible bindings" is not one of them. ... you have to use define-symbol-macro and symbol-macrolet to bring symbol macros into existence. ...
    (comp.lang.lisp)
  • Re: More questions about exported symbols and general style.
    ... up bindings to captured variables (like IT in anaphoric macros) in ... packages that I'll be using. ... names magically spring into existence without visible bindings is not ...
    (comp.lang.lisp)
  • Re: More questions about exported symbols and general style.
    ... packages that I'll be using. ... I've found I've gotten in the habit of naming captured variables ... What you have to keep in mind is that anaphoric macros are only useful as surface syntax. ... If SOME-MACRO expands into a use of AIF (or some other anaphoric macro introducing a new binding for IT), then the inner probably doesn't do what you expect it to. ...
    (comp.lang.lisp)
  • Re: More questions about exported symbols and general style.
    ... This is a bit of a tangent, but: don't write anaphoric macros. ... names magically spring into existence without visible bindings is not ... Now I have to stop using special variables and symbol-macros?!! ... Special variables and symbol macros don't have that problem. ...
    (comp.lang.lisp)