From: Russ Cox Date: Thu, 20 Oct 2016 18:37:31 +0000 (-0400) Subject: doc/faq: mention that copying discussion is semantics, not implementation X-Git-Tag: go1.8beta1~685 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=afe675c2fa9deacd61f5684be54f1ebbdc94fc0c;p=gostls13.git doc/faq: mention that copying discussion is semantics, not implementation Fixes #17181. Change-Id: If7cc4865e391acf76512f7ec7167d5a31377b598 Reviewed-on: https://go-review.googlesource.com/31574 Reviewed-by: Rob Pike --- diff --git a/doc/go_faq.html b/doc/go_faq.html index 6a955f6f3f..37a31ae289 100644 --- a/doc/go_faq.html +++ b/doc/go_faq.html @@ -1151,6 +1151,12 @@ struct. If the interface value holds a pointer, copying the interface value makes a copy of the pointer, but again not the data it points to.

+

+Note that this discussion is about the semantics of the operations. +Actual implementations may apply optimizations to avoid copying +as long as the optimizations do not change the semantics. +

+

When should I use a pointer to an interface?