On Sun, Nov 15, 2009 at 8:45 AM, Michael Wood <esiot...@gmail.com> wrote:
> 2009/11/14 John Harrop <jharrop...@gmail.com>: > > On Sat, Nov 14, 2009 at 1:42 PM, Richard Newman <holyg...@gmail.com> > wrote: > >> > >> I like CL's package support for this kind of situation, where > >> unexported symbols can still be reached via foo::bar, at the cost of > >> an obvious "code smell". > > > > This suggests an alternate fix for the private functions in macros > problem: > > 1. Keep the throw when dereferencing another ns's private vars. > > 2. Add a way to override that throw when dereferencing -- a > > "deref-private" that always works. > > 3. Add a reader macro, say #!, with the property that #!foo expands > > to (deref-private #'foo). > > Except you'll have to find another reader macro. #! is already taken. > It's a comment-to-end-of-line reader macro to support Unix scripts. That's weird. It's not documented anywhere on the site. And it seems to hang the REPL: user=> nil #!foo and nothing. Enter doesn't print "nil" and a fresh user=> prompt as it should and nothing else apparently works either. The REPL is either wedged or interpreting everything as comment from then on. Weirdly enough, ; hangs the REPL likewise. Maybe use @!? That's closer to @ and the ! is still there to suggest something perilous, as it does with the mutable-state fns. It would prevent using normal deref-@ with symbols that start with !, but does anyone actually use symbols that start with ! at this time? Even not= is not= instead of !=. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en