3 ms·
My problem with it is how confusing the default behaviour is. As I say it is a perfectly reasonable datatype but in my view a misuse of let to create it. Any t
by josephlord 12y ago
My problem with it is how confusing the default behaviour is. As I say it is a perfectly reasonable datatype but in my view a misuse of let to create it.
Any time you pass an array as an argument you have to expect that it may be modified (so you must copy it if you still need the array as it is). Every time you return an array you have to expect that it can be altered so again you need to copy it if you still need it. Given this immutable arrays may let you use less memory because they would only need to copied when they were written to not as a precaution when they are passed as arguments.