|
|
|
|
|
by TillE
3796 days ago
|
|
I hope they do adopt that suggested change to method calls. Swift is a nice language, but there's still some awkwardness due to its required compatibility with Objective C. I think if you don't come from that background, then having all named arguments except the first one seems really arbitrary and nonsensical. |
|
Whereas the post's example compares:
I've been doing it as so: ...requiring the "toPoint", which can swapped out true method overloading style: In your internal method implementation, Swift allows you to replace the external method name with an internal one, so that it's still nice to work with: I personally think it's a lot more readable. Otherwise the first argument has to have a really descriptive class name (recommended for sure, but often not the case).