On Sun, Jul 19, 2009 at 7:42 AM, Mark Volkmann <r.mark.volkm...@gmail.com>wrote:

>
> On Sat, Jul 18, 2009 at 10:58 PM, Jeff Brown<jeffscottbr...@gmail.com>
> wrote:
> > I have released version 0.1 of a plugin which provides support for easily
> > accessing Clojure code in a Grails app.  There are some docs available
> > at http://grails.org/plugin/clojure which describe how to use the
> plugin.
> >  Those docs reference a brief video
> > at http://s3.amazonaws.com/jeffscreencasts/grails_clojure_demo.mov which
> > shows how the thing works.
> > The Grails framework is really flexible and it was very easy to add
> support
> > for Clojure.  I hope that the plugin will make Clojure that much more
> > accessible to some folks.
> >
> I welcome feedback from anyone in the Clojure community who may have an 
> interest in this.
> > Thanks.
>
> Very cool Jeff! You did a great job on the video too!
>
> Are there limitations on what can be passed from Grails to Clojure?
> Can only primitive values be passed or can collections be passed? If
> collections are supported, how are Groovy collections mapped to
> Clojure collections?
>


Any object may be passed to a clojure function including primitives,
objects, collections... anything.  Of course when you pass Java/Groovy
objects into a clojure function and start manipulating it, you are giving up
all guarantees that clojure can make in terms of concurrency and
immutability.  That is just part of the deal with clojure.  Clojure can't
keep you from mutating mutable Java objects because clojure allows you to
call any method you like on a Java object.

More interesting than the ability to pass anything in to a clojure function,
you can get anything back from a clojure function.  For example, the
following returns a persistent list...

(defn getit []
    (list "jeff" "zack" "jake"))

If I call that function from Java or Groovy, I get back
a clojure.lang.PersistentList.  I think this is really interesting.  Clojure
has a great set of data structures.  Some Java developers who don't want to
write Clojure code may use the clojure libraries just for the data
structures.



jb
-- 
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

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