On Tuesday, May 2, 2017 at 6:00:52 PM UTC-5, Jenny Finkel wrote:
>
> Thanks for the reply. Your explanation for why it should be expected 
> sounds like implementation details though (why it is that way, but not why 
> it should be that way). 
>

I'll grant you that, and I could certainly be wrong in my interpretation. 
In large part, the Clojure print system is based on the Common Lisp print 
system and its in many cases it's more complicated than I wish it was. 
 

> The docstring for 'pr' admittedly makes a reference to "by default" 
> ("Prints the object(s) to the output stream that is the current value of 
> *out*. Prints the object(s), separated by spaces if there is more than one. 
> By default, pr and prn print in a way that objects can be read by the 
> reader") but I don't understand why calling 'pr-str' inside of 'print' 
> should be considered non-default. Nothing in either of their docstrings 
> references the other, or mentions *print-readably*, you have to look at the 
> code directly to be aware of the relationship. 
>

Generally, I find in most contexts Clojure code is using one or the other 
(print* for printing to console or repl for human consumption and pr* for 
intended later consumption as data via the reader). I cannot recall running 
into a combination like this in the past where print is being used with 
pr-str. Not saying it's wrong, just that it's not common in my experience.
 

> I have a branch where pr-str binds *print-readably* to true and it seems 
> to work fine. Without re-implementing all of them together though I guess 
> that it's impossible to get a 'pr' inside of a 'print' to actually print 
> something that's readable, so it would only fix it for 'pr-str' and not for 
> 'pr'. 
>

It's difficult for me to comment on the impact or extent of a change like 
this without substantial effort / archaeology. Certainly it seems 
problematic if this affects only some of the pr functions but not all of 
them.

Can you explain more about how you are experiencing this problem in the 
first place? 
 

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