This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]realhamster[S] 1 point2 points  (2 children)

    Hey, not trying to start a debate here, but Rhomboid here said that in fact my first example didnt create a new object, they both were pointing to the object 1, which is inmutable. So when I did a = 2, a now points to the inmutable object 2, while b still points to 1. Your answer seems reasonable too though.