The following pathological case triggers a confusing stack overflow error.

*$ lein repl*
*...*
*user=> (def x (atom nil))*
*#'user/x*
*user=> (reset! x x)*
*
*
*StackOverflowError   java.util.regex.Pattern$Curly.match 
(Pattern.java:4125)*
*
*
*;;; Of course, I can avoid the problem:*
*user=> (set! *print-level* 3)*
*3*
*user=> (reset! x x)*
*#<Atom@4d98da: #<Atom@4d98da: #<Atom@4d98da: #>>>*



Would it be reasonable for the repl to wrap a safe *print-level* and 
*print-length* around the printing?  100, or even 500, would probably never 
stack-overflow, and would be more reasonable behavior for most users.

Even if this is not reasonable in general, perhaps it would still make 
sense around the printing of any "#< ...>" entity, where the internal text 
is always just for human consumption.


-- 
-- 
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/groups/opt_out.


Reply via email to