|
|
|
|
|
by ehsankia
473 days ago
|
|
If it's safety/correctness versus performance, I think the default should be the former. Copying, while inefficient is generally more correct and avoids hard-to-debug errors. It's the whole discussion about premature optimization.
I'd rather make a copy than make sure the array is not mutated anywhere ever. |
|