| ▲ | raddan 6 hours ago | ||||||||||||||||
> T is not any type, T is a type defined at compile time, This is a distinction without a difference. In a static, type-safe language, T always has to be instantiated with a type. But that does not change the fact that, from the perspective of the function definition, T is any type. T must be a specific type for the function call. | |||||||||||||||||
| ▲ | rcxdude 4 hours ago | parent [-] | ||||||||||||||||
From the function's point of view it may be asked to return any type T. That is not the same thing as it being able to return any type that is convenient for its implementation. | |||||||||||||||||
| |||||||||||||||||