a2800276 <a2800...@gmail.com> wrote: > Just out of curiosity, does anyone have a good rationale as to why there > are only unsigned conversions available `binary.ByteOrder`? It would seem > that this functionality is there to avoid dumb careless errors doing byte > order conversions, but this design forces me to have to think about whether > I can cast uint64 to int64 without loss of precision ...
I don't understand how an Int64() method can do any better than int64(x) conversion, neither how there's loss of precision if both are the same size, and on any computer I'm aware of both types uses the same bit pattern. So maybe that's the rationale, use regular uint64 -> int64 langauge conversion. BR. -w -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2PIXEYGFTJ957.2RF2M88CQ0B44%40104d.net.