On 1 November 2013 13:46, wrote:
Ok, I understand. So one has to be very careful when passing references
around
Ok, I understand. So one has to be very careful when passing references
around
because the underlying array will get changed but unless the reference is
copied back to the original reference the change won't be reflected.
That's right: the len and cap are parts of the /slice value/, not of thecopied back to the original reference the change won't be reflected.
/underlying array/.
if the size or capacity change. Are pointers to references then the only
way to do this type of manipulation?
You can return the new slice as a result, which is what I'd doway to do this type of manipulation?
unless there was good reason not to.
Chris
--
Chris "allusive" Dollin
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.