21
A quick tip for better variable names
(programming.dev)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
A good example is Go's time package. You'd normally express durations like
5 * time.Second
and the result is atime.Duration
. Under the hood, it's just an int64 nanoseconds, but you'd never use it as a plain nanoseconds. You'd instead use it liked.Seconds()
to get whichever unit you desire.