Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I 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.


C#'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?v...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: