▲ | tetha 4 days ago | |||||||
This is why I'm sad that hungarian notation has gained into such a bad reputation. Sure, you can overdo it, but a `duration_ms` or a `response.size_bytes` or a `max_memory_mb`, or an `overhead_ns` is so much easier to use. | ||||||||
▲ | account42 4 days ago | parent [-] | |||||||
Better yet would be unit-aware types. Then instead of duration_ms = 1000 you can have duration = 1s // or duration = Seconds(1) in deficient languages and it's either a compile error or the type system enforces the correct conversion. As for the bad rap of hungarian notation, it's mostly from people using it to encode something that is already clear from the types. "fDuration" helps no one over just "duration". | ||||||||
|