▲ | fwip 3 days ago | ||||||||||||||||
No - "delay_in_milliseconds" will let you find the error and resolve it faster. With the less descriptive name, you need to notice the mismatch between the definition and the use site, which are further apart in context. Imagine you see in your debugger: "delay_in_milliseconds: 3" in your HttpTimeout - you'll instantly know that's wrong. If you believe your reductive argument, your function and variable names would all be minimally descriptive, right? | |||||||||||||||||
▲ | deadbabe 3 days ago | parent [-] | ||||||||||||||||
For your specific example, there would never be a “delay in milliseconds” variable in the first place. That’s just throat clearing. “sleep 1” is the complete expression. Because sleep takes a parameter measured in seconds, it’s already understood. You do not need “delay_in_seconds = 1” and then a separate “sleep delay_in_seconds”. That accomplishes nothing, you might as well add a comment like “//seconds” if you want some kind of clarity. | |||||||||||||||||
|