In Go arguments (function parameters) passed by value.
This means that when you call function you pass copy of the instances.
If you modify (received copy) then original instance remains unchanged.
Pointer points to the  storage of the instance.
When you pass pointer as an argument then you pass a copy of reference.
This means that you cannot change the strorage of the instance because you 
get a copy of the reference to the storage.
But this means that you can change the instance because you get reference 
of it storage.
You even can replace strored instance by the another instance.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to