3 ms·
Aesthetically, one of the things I didn’t like about Swift was the use of parameter names in the parameter list to ensure integration with the objc api. Made so
by msie 5y ago
Aesthetically, one of the things I didn’t like about Swift was the use of parameter names in the parameter list to ensure integration with the objc api. Made some function calls too verbose. One of the things we should have abandoned when we left objc. I admit it sounds silly but swift wasn’t a clean break as i thought it would be.
- andrekandre 5y agoparameter 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)