Never be sorry about being curious.

On Apr 3, 10:06 am, Berlin Brown <berlin.br...@gmail.com> wrote:
> On Apr 3, 10:09 am, Stuart Halloway <stuart.hallo...@gmail.com> wrote:
>
>
>
> > No threads:
>
> > (ancestors (class (fn[])))
> > -> #{java.lang.Runnable java.io.Serializable clojure.lang.AFn
> > clojure.lang.Obj java.lang.Object clojure.lang.Fn
> > clojure.lang.AFunction clojure.lang.IObj clojure.lang.IFn
> > java.util.concurrent.Callable clojure.lang.IMeta java.util.Comparator}
>
> > What you are referring to is the fact that functions implement
> > Callable and Runnable, so that they can trivially play nice with Java
> > threads if you need them to.
>
> > Stu
>
> > > Someone correct me if I go wrong here.  But, from my understanding,
> > > every defined function in Clojure is an implementation of a thread?
>
> > > What is the goal in implementing in this fashion?  For example, if I
> > > am writing in imperative style:
>
> > > (println "First line")
> > > (println "Second line")
> > > (println "Third line")
>
> > > ...
>
> > > The operations have to occur synchronously.  What does adding Java
> > > threading add to the mix?
>
> oh OK, sorry about.
--~--~---------~--~----~------------~-------~--~----~
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
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