The book that I'm currently reading on the topic of Swift Game Development references Swift functions without the first parameter and instead uses an underscore like so....
URLForResource(_, withExtension)
In actual code samples the underscore is replaced by a value, but when just referring to that function it is written as above. I've also seen it written this way in Apple documentation.
I just don't understand why the underscore is there. If this is the way you refer to a certain function, then how is the user supposed to know what kind of value goes in place of the underscore?
I have read that the first parameter in the function doesn't have to have an outside name, and that's fine, but leaving out the first parameter seems like it would cause the extra step of having to look up the function to see what parameter to pass there.
Would love if it if someone could clear this up for me. Thanks