FAQ

On 2013/10/13 22:39:20, kortschak wrote:
On 2013/10/11 21:37:17, gri wrote:
Any other input? r? iant?

I remain unconvinced that defining that append must re-use the
underlying
array if there's enough space is the right thing to do (the spec
never said
it is required and good code shouldn't rely on undocumented
features).
But I'll bow to overarching sentiment if everybody agrees (after
all, we
cannot simply shutdown this place...).

- gri
Is there are simple way to specify that it might not re-use if the the non-reuse
is not observable, for example in your example above, 'copy(dst,
append(src,
x))'?
In the example given, the re-use _is_ observable if the spec says so
(the underlying array of src would be changed as a result of the
append). That's exactly the point. If the re-use is not observable, the
compiler is already free to optimize within the confines of the spec.


https://codereview.appspot.com/14419054/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/047d7b6dcdd64cf13204e8b771e8%40google.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 14, '13 at 6:22p
activeOct 14, '13 at 6:22p
posts1
users1
websitegolang.org

1 user in discussion

Gri: 1 post

People

Translate

site design / logo © 2022 Grokbase