As far as I know, :=
seems to do an assignation by copy. The operator =>
seems to do a similar assignation, but is used when assigning a parameter to a member variable of an object.
so...
receivesTheCopy := isBeingCopied
memberVariable => passedParameter
I'm working on someone else's old code and I have a variable reaching a value that I never see explicitly assigned to it with :=
. I was thinking that maybe when it is assigned to a memberVariable
with =>
it was passed by reference, and thus the passedParameter
variable stayed tied to the memberVariable
state.
:=
is an assignment.
=>
has multiple purposes:
In neither case it has anything to do with pass-by-reference or pass-by-value.