why there is pointer as there are slice already? Can we remove pointer ?
any where there is a pointer could be replaced with slice.
func ptrfunc(p *int) {
*p = 1
}
func slicefunc(p []int) {
p[0] = 1
}
and we can defined a shortcut operator like ~ p[0].foo = p~foo
does that violate the golang principle, do one thing with one method
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.