5 ms·
One of my personal rules is to ALWAYS suffix the variables and fields with unit names: `timeout_ms` or `rate_kbps`, NOT `timeout` or `rate`. Unless the variab
by cyberax 3mo ago
One of my personal rules is to ALWAYS suffix the variables and fields with unit names:
`timeout_ms` or `rate_kbps`, NOT `timeout` or `rate`.
Unless the variable type already constrains it (e.g. Duration in Go).
- markus_zhang 3mo agoThis also helps downstream a lot.
- monkpit 3mo agoUntil someone comes along and changes it without updating the name, or the value comes from a remote service and they change without you changing your name… etc.