|
|
|
|
|
by AndrewDMcG
4030 days ago
|
|
I agree with this too. Pulling constants out to the top a source file is often a mistake. It's useful if someone is looking at the source file to find the constant, but usually it's more likely that they're reading the code to understand it, and then need to know the value of the constant. In these cases it can be better to have a constant but define it close to where it is used. |
|
It also encourages you (for better or worse) to use `maxRetries` in multiple places.
The value of 5 is, in the long run, meaningless. It could have easily been 3 or 10.