5 ms·
I don't think this is a _typical_ signature. On the contrary, it's quite exceptional. In my experience having more than 1 type parameter in a function is quite
by paavohtl 5y ago
I don't think this is a _typical_ signature. On the contrary, it's quite exceptional. In my experience having more than 1 type parameter in a function is quite rare in most code, unless you're building an advanced, composable library like a futures implementation.
- MrBuddyCasino 5y agoI didn't mean "typical" as in "most Rust fn signatures are like that", obviously most functions are far simpler. Who would even claim that? I meant "you will only encounter this level of generics complexity in Rust" (disclaimer: I don't know C++). They can't be that rare either, I have not written a lot of Rust but already encountered similar constructs multiple times. But admittedly that might be partly due to no-std requirements.
- jen20 5y agoC#'s `Tuple<T1,T2,T3,T4,T5,T6,T7,TRest>` [1] would like a word! [1[: https://docs.microsoft.com/en-us/dotnet/api/system.tuple-8?view=net-5.0 https://docs.microsoft.com/en-us/dotnet/api/system.tuple-8?v...