Immutability and strings

Kagamin spam at here.lot
Wed Aug 18 22:52:48 PDT 2010


Andrej Mitrovic Wrote:

> I agree that in this case s1 and s2 will remain the same. But this has to do *not just* with immutability, but with the fact that s1 is passed by value. I think that should be mentioned here.
> 
In the first example a string reference is passed by value.
In the second example a string reference is passed by reference.


More information about the Digitalmars-d mailing list