You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In JVM print-method is not included by default, it needs access to the host print-method multimethod
SCI records are based on one Clojure / CLJS record type which defers to a runtime SCI type. When implementing print-method for a SCI records, some state is mutated which affects the general Clojure / CLJS print-method for the general record type which dispatches on the SCI type.
To let users implement IPrintWithWriter in general (not records), we could do two things:
Have a multi-method counterpart which defers to the protocol (this is done for e.g. IDeref in SCI). This comes with performance overhead for printing though.
Mutate the IPrintWithWriter CLJS protocol directly (given access to the host, or, presence of this protocol in the SCI config)
But since SCI records all share one CLJS record type, 4 isn't sufficient, so we need to defer to some indirection anyway which can be mutated given the SCI type of the record.
It seems, just for SCI records, we don't need to implement IPrintWithWriter for all use cases, so maybe starting with 5 and working our way back is the best approach.
The text was updated successfully, but these errors were encountered:
Similar to
print-method
.Some notes:
print-method
is not included by default, it needs access to the hostprint-method
multimethodprint-method
for a SCI records, some state is mutated which affects the general Clojure / CLJSprint-method
for the general record type which dispatches on the SCI type.IPrintWithWriter
in general (not records), we could do two things:IDeref
in SCI). This comes with performance overhead for printing though.Also see #639
It seems, just for SCI records, we don't need to implement IPrintWithWriter for all use cases, so maybe starting with 5 and working our way back is the best approach.
The text was updated successfully, but these errors were encountered: