3 ms·
If you are only dealing with Immutable structures that no one can really change, there is no point in passing by value. You can always pass by reference. The la
by owaislone 10y ago
If you are only dealing with Immutable structures that no one can really change, there is no point in passing by value. You can always pass by reference. The language will not allow any code to modify it. Instead a new variable will have to be assigned if the function changes the values. So, it can always be pass by reference until a change needs to be made aka copy on write.