Something
public text v1 · immutableInteger>>printWithSeparators
| n out start end index |
out := WriteStream on: (String new: 10).
n := self abs printString.
end := n size.
end < 4 ifTrue: [out nextPutAll: n. ^out contents].
start := end \\ 3.
index := 1.
(n copyFrom: start + 1 to: end) reversed do: [:digit |
out nextPut: digit.
(index \\ 3 = 0 and: [index < end]) ifTrue: [out nextPut: $,].
index := index + 1].
^(self < 0 ifTrue: ['-'] ifFalse: ['']), (n copyFrom: 1 to: start), out contents reversed