Hacker News new | ask | show | jobs
by yazzku 567 days ago
"You mean you're going to make a copy of that every time?"
1 comments

Haha, can't tell if you're joking or not.

For anyone else reading - you don't need to make a copy if you know your data isn't going to change under your feet.

https://dev.to/kylec32/effective-java-make-defensive-copies-...

I was half-joking. I wasn't aware Java was promoting "defensive copies" :D