I think substrings are already "views".
# advent-of-code
k
I think substrings are already "views".
o
not in the newest JVMs
k
Huh. Did it become to complicated to GC the unnecessarily large backing arrays out or something?
k
that's what I would wonder. if
b = a.substring(7, 13)
doesn't copy, then
a
can't be garbage collected while
b
lives.
which is sometimes what you want but does not sound like a good default.