On Wednesday, June 24, 2015 at 4:56:06 PM UTC-4, Ignacio Thayer wrote:
>
> I think this might be rehashing some old stuff, but I haven't seen 
> discussion on it recently and I see this behavior is still present in 1.7 
> so I thought I'd ask. It's the same underlying issue as this: 
> http://dev.clojure.org/jira/browse/CLJ-1532?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel#issue-tabs
>
> Having pr-str binding to the same *out* that's used by printing seems 
> dangerous - is there a more commonly accepted standard way to serialize for 
> edn?
>

It's not hard to make a wrapper. Binding *out* io/writer my-output-stream), 
binding *print-dup* true, pr-str foo, close parenthesis, close parenthesis. 
Maybe it should be under clojure.edn as edn/write or something, but at 
least it's nigh trivial to write. My main complaint with edn is that 
*reading* isn't platform independent because you need to wrap io/reader in 
a PushbackReader on JVM. There's nothing in the io or edn libraries to make 
a reader that read-string and edn/read will accept, so you have to juggle 
platforms in your own code, and even with cljc that's a nuisance that might 
have been avoided if there's nothing else platform-varying that you need 
that isn't abstracted behind some multi-platform library.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to