Why does `std.mem.sort` have the `context` field? (opens in new tab)
TL;DR Why does std.mem.sort take in a context structure? I’ve only used Rust, Julia, Python and OCaml and their sort implementations don’t do that. This seems like (to me, who’s not a very good programmer) a strange thing a standard library sort function to have? The other languages I know don’t have that, but I did learn that libc has it, which makes me think there’s a common use case for this that I’m unaware of. Could somebody point me in the right direction to learn why this is such a com...
Read the original article