Hi,

in this silly code, with a very naive main, 
which i think is a small representation of some situations 
we might face irl on larger code base.

https://play.golang.org/p/qv5ymHDzr2

Lets say the story of this code is,
at first we needed to store values,
then we discovered an allocation issue,
third, we tried to fix it,
fifth all tests passed with no changes,
sixth when we run it on long duration, 
everything was misbehaving.

is there anything that can be done so 
the naive programming of the main does not behave unexpectedly ?

As a side note, i d say if consumer would not take an interface, 
but a concrete value, it is then possible to enforce a copy,
but i did choose an interface on purpose for the silly example.

-- 
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.

Reply via email to