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 <r@golang.org>
This commit is contained in:
Russ Cox 2016-10-20 14:37:31 -04:00
parent 39690beb58
commit afe675c2fa
1 changed files with 6 additions and 0 deletions

View File

@ -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.
</p>
<p>
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.
</p>
<h3 id="pointer_to_interface">
When should I use a pointer to an interface?</h3>