(no title)
cytzol | 4 years ago
delaySecs := 1 * time.Second
time.Sleep(delaySecs * time.Second)
Now I insist on using the durationcheck lint to guard against this (https://github.com/charithe/durationcheck). It found a flaw in some exponential-backoff code I had refactored but couldn’t easily fully test that looked right but was wrong, and now I don’t think Go’s approach is reasonable anymore.
aasasd|4 years ago
ironmagma|4 years ago
rsa25519|4 years ago
nine_k|4 years ago
I know how to implement that in Haskell, and that it can be implemented in C++ and Rust. I know how to logically implement that in Java or Typescript, but usability will suck (no infix operators).
eyelidlessness|4 years ago
linkdd|4 years ago
Which is wrong, 1s * 1s = 1s².
For example, the force of gravity is expressed in m/s² and describe an acceleration (m/s / s, aka a change of velocity per time units, where velocity is a change of distance per time units).
unknown|4 years ago
[deleted]
unknown|4 years ago
[deleted]