On Thu, Nov 29, 2018 at 2:15 PM Robert Engels <reng...@ix.netcom.com> wrote:

> Also, the most important reason against the setters - a Fixed is
immutable.

Great, then just let the setter return a value.

x := fixed.New(0).SetString(foo)

Similarly like big.Float.SetString
<https://golang.org/pkg/math/big/#Float.SetString> does and how it's
typically used.

The point is that the New should take the type that is expected to be used
most often. In your case it would be probably int64, less probably float64
or string.

-- 

-j

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to