ClojureScript Reflection

2012-04-26 Thread Sean Nilan
Hi, I was wondering what support there is in ClojureScript for reflection. 
Is there any way to get a constructor function from just the name of the 
record / class? ClojureScript doesn't have support for reading in records 
from a string like Clojure does.

Basically what I'd like to do is:

(defrecord Card [suit number])

(def card (Card. :spades 10))
(def str-card (pr-str card))

(def new-card (read-record str-card))

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

Re: ClojureScript Reflection

2012-04-26 Thread David Nolen
Just hasn't been implemented yet. Patch welcome :)

On Wed, Apr 25, 2012 at 3:18 AM, Sean Nilan sean.ni...@gmail.com wrote:

 Hi, I was wondering what support there is in ClojureScript for reflection.
 Is there any way to get a constructor function from just the name of the
 record / class? ClojureScript doesn't have support for reading in records
 from a string like Clojure does.

 Basically what I'd like to do is:

 (defrecord Card [suit number])

 (def card (Card. :spades 10))
 (def str-card (pr-str card))

 (def new-card (read-record str-card))

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

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