Fair enough. I didn't really remember that warning from before.

So three sources provide 3 choices of "a very big array". Using 1<<31-1
would be the largest portable choice, right?
On Saturday, April 2, 2016 at 1:41:00 PM UTC-7, James Bardin wrote:

On Sat, Apr 2, 2016 at 4:18 PM, Bryan Matsuo <bryan....@gmail.com
<javascript:>> wrote:
On Saturday, April 2, 2016 at 5:25:05 AM UTC-7, Tamás Gulácsi wrote:

The reflect.SliceHeader solution is deprecated.

Can you please give a better explanation than that? Ideally one that has a
link. I get tat the docs say it's unsafe, but to me it's not obviously less
safe than the other conversion being discussed.
I assume because the docs for the SliceHeader say: "[SliceHeader]
cannot be used safely or portably and its representation may change in
a later release.". Whereas the array-to-slice conversion happens
correctly and safely regardless.

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/d/optout.

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 10 | next ›
Discussion Overview
groupgolang-nuts @
postedApr 1, '16 at 11:16a
activeApr 2, '16 at 9:55p



site design / logo © 2021 Grokbase