protocol | since v0.0-1503 | Edit |
ArrayNodeSeq
Atom
BlackNode
ChunkedCons
ChunkedSeq
Cons
Cycle
Delay
ES6IteratorSeq
Eduction
EmptyList
ExceptionInfo
IndexedSeq
IntegerRange
Iterate
KeySeq
Keyword
LazySeq
List
MapEntry
NodeSeq
ObjMap
PersistentArrayMap
PersistentArrayMapSeq
PersistentHashMap
PersistentHashSet
PersistentQueue
PersistentQueueSeq
PersistentTreeMap
PersistentTreeMapSeq
PersistentTreeSet
PersistentVector
RSeq
Range
RedNode
Repeat
Subvec
Symbol
TaggedLiteral
TransformerIterator
UUID
ValSeq
Var
Volatile
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.
(defprotocol IPrintWithWriter
(-pr-writer [o writer opts]))