Why do Refs implement IFn and Atoms don't?

1 view
Skip to the first unread message

David Nolen

unread,
14 May 2009, 5:56:38 pm14/05/09
to clojure
Just curious about the reasoning behind this decision?

((ref +) 3 4) ; -> 7
((atom +) 3 4) ; Exception

Christophe Grand

unread,
15 May 2009, 1:25:37 am15/05/09
to clo...@googlegroups.com
David Nolen a écrit :

> Just curious about the reasoning behind this decision?
>
> ((ref +) 3 4) ; -> 7
> ((atom +) 3 4) ; Exception

Last time I asked, Rich said to not rely on refs implementing IFn. (It
may be a remain from the time where vars and refs were the same thing --
just guessing)


--
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)


Reply all
Reply to author
Forward
0 new messages