Unlike C you can stamp out a specialized and typesafe sort function via generics though:
https://ziglang.org/documentation/master/std/#std.sort.binar...