On Tue, 2022-07-19 at 09:24 -0700, Amnon wrote:
> > time.NewTicker( time.Duration(n) * time.Second )      ok : duration
> > * duration [s^2] square-seconds ?
>
> Yes, this bothers the inner Physicist in me too.
> But you can only multiply numbers if they are of the same type...

With a small amount of gymnastics a reasonable comfort can be found;
types aren't units, but can be used to decorate them as such. This
means they underly the notion of a unit. (Tangentially, there are
packages that do dimensional operations, for example
https://pkg.go.dev/gonum.org/v1/gonum/unit).

-- 
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/00d2056025ad04d744082a72eb5249694e7b9e5d.camel%40kortschak.io.

Reply via email to