Clojure

GC Issue 56: Make printed IRef's more useful

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Reported by chouser, Jan 28, 2009
Describe the feature/change.

Currently when you print an IRef, the contents are not printed.  With
the attached patch:

user=> (agent 99)
#<Agent@1dee400: 99>

user=> (atom #{:bomb})
#<Atom@e3849c: #{:bomb}>

user=> (ref "erence")
#<Ref@44cbbe: "erence">

Note that they're no more readable in the (read) sense.  Also note
that Vars are unchanged:

user=> #'nil?
#'clojure.core/nil?

Was this discussed on the group? If so, please provide a link to the
discussion:

http://groups.google.com/group/clojure/browse_thread/thread/e63c5e3e1f429f6e

 print-iref.patch
694 bytes Download
Comment 1 by richhickey, Feb 09, 2009
patch applied - svn 1254 - thanks!
Status: Fixed

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: