Also just what I needed - thanks!

On Mon, Aug 24, 2009 at 8:05 PM, Dragan Djuric<draga...@gmail.com> wrote:
>
> It may look silly, but that's just what I need AND the last time I
> checked
> it didn't work!
> Now it does :)
>
> Thanks!
>
>> On Aug 24, 7:14 pm, samppi <rbysam...@gmail.com> wrote:
>> I just discovered something cool that might seem obvious to some
>> people but is, as as I can tell, undocumented and caught me totally by
>> surprise. It's well known that the reader resolves ::something
>> into :the-current-namespace/something. But what I found out is that if
>> you use require to alias a namespace, you can use that abbreviation
>> with the double colon and a slash:
>>
>> Clojure 1.0.0-
>> user=> (require '[clojure.contrib.test-is :as t])
>> nil
>> user=> :t/a
>> :t/a
>> user=> ::a
>> :user/a
>> user=> ::t/a
>> :clojure.contrib.test-is/a
>>
>> I had no idea, and I think it's an awesome feature.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to