i know that .NET String class uses such behaviour, but I can’t find any implementation, and i don’t know how to name this behaviour. Any ideas will be helpful.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The string class is referred to as being Immutable.
An extremely simplified example might look like:
The object in this context cannot be changed. If you require another MyValue object with the current value added to another value, you get a new object.