Skip to main content

IPrintWithWriter

protocolv1.7

cljs.core/IPrintWithWriter

The old IPrintable protocol's implementation consisted of building a giant list of strings to concatenate. This involved lots of concat calls, intermediate vectors, and lazy-seqs, and was very slow in some older JS engines. IPrintWithWriter implements printing via the IWriter protocol, so it be implemented efficiently in terms of e.g. a StringBuffer append.

No examples yet. Be the first to add one!