Re:How Go improves expressiveness without sacrificing perfor...
by dhconnelly on Saturday February 11, 2012 @07:08PM
(#3580581)
I think the improvement in expressiveness here is in not having to do &E before calling the method that has receiver type * E. That is, (&E[i]).update(1, 2, 3, 4) and E[i].update(1, 2, 3, 4) do the same thing, so he was able to eliminate writing &E[i].
Also, if the method was defined with receiver type E, and you have a variable x of type * E, you can also do x.update instead of (*x).update. Go automatically dereferences.
(edited: my asterisk operators made everything italicized)
Also, if the method was defined with receiver type E, and you have a variable x of type * E, you can also do x.update instead of (*x).update. Go automatically dereferences.
(edited: my asterisk operators made everything italicized)