79692718

Date: 2025-07-07 10:45:24
Score: 0.5
Natty:
Report link

I would answer your question differently, OP. There is no specific rule in the [Swift programming language guide](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/generics) or the [reference](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/genericparametersandarguments) that says you shouldn't specialise a generic parameter's name when calling a generic function. Rather, there is a supporting example in the Swift programming language guide about generics, which implements the swapTwoInts function. And we can imply from the example that we don't need to specialise the generic argument's parameter name when calling a generic function. See [Type Parameters](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/generics#Type-Parameters):
"...the type parameter is replaced with an actual type whenever the function is called."

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Asaad Jaber