3 ms·
parameter names help you to see what those values are supposed to be though without parameter names, something like `func range(int, int)` can become dangerous
by andrekandre 5y ago
parameter names help you to see what those values are supposed to be though
without parameter names, something like `func range(int, int)` can become dangerous because you dont know if the first parameter is the start and end or is it start and length?
`range(start: int, end: int)` makes it clear at the call site what is going on and gives your brain enough info to not mess up the parameters (especially when refactoring or fixing bugs in existing code)