On second thought, I see that my code snippet wouldn't work. The following
analogous code throws an exception.

(if (resolve 'foo) (foo 1) 1)

I also see that I can't use try-catch to catch symbol resolution exceptions.

Does this mean I have to test for the Clojure version before runtime? In an
ant build file? Is there a better way?

Garth

On Mon, Aug 3, 2009 at 11:48 PM, Garth Sheldon-Coulson <g...@mit.edu> wrote:

> Holy smokes. This is great. It's been said before and it'll be said again:
> Rich really knows what he's doing.
>
> This will make number crunching in Clojure even more attractive.
>
> Question: Suppose I want to write code that will run on 1.0 but take
> advantage of transients if available. Is there a more appropriate thing to
> do than the following?
>
> (if (resolve 'transient)
>   (transient code)
>   (persistent code))
>
> Garth
>
>
> On Mon, Aug 3, 2009 at 5:25 PM, Rich Hickey <richhic...@gmail.com> wrote:
>
>>
>> I've been doing some work on Transient Data Structures. You can read
>> about them here:
>>
>> http://clojure.org/transients
>>
>> Feedback welcome,
>>
>> Rich
>> >>
>>
>

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