Closed
Description
It is either not possible or not easy to customize the str
output for a type or record right now:
(definterface Shape
(area []))
(defrecord Circle [radius]
Shape
(area [self]
(* 3.14 radius radius))
(__str__ [self]
(str "radius: " radius)))
(str (->Circle 1)) ;; => "#basilisp.user.Circle{:radius 1}"
This is likely due to the messy and convoluted relationship between basilisp.lang.obj.lrepr
and basillisp.core/str
.