There's something I'm not understanding about how comptime sometimes is an attribute describing a value (like comptime var x: u8 = 2) and how sometimes the fact that something exists at comptime makes its way into the type signature (like how fn (x: u8) void and fn (comptime x: u8)) are two completely different types.
Using insertion sort as an example, it has a signature like
pub fn insertion(
comptime T: type,
items: []T,
context: anytype,
comptime lessThanFn: fn (@TypeOf(context), lhs: T, rhs: T) bool,
) void {
Since this signature doesn't include a "comptime" indication on lhs and rhs, the comparator likewise cannot have that indication. Conversely, types as arguments are mandated by the language to be tagged as comptime. I can write fn typeLessThan(_: void, comptime lhs: type, comptime rhs: type) bool, but the compiler will not accept fn typeLessThan(_: void, lhs: type, rhs: type), even when I intend to run insertion sort at comptime. Since the latter can't exist and the former doesn't match the signature required by insertion, it seems impossible to sort in that way.
Is that kind of limitation intentional? It seems on the surface to mandate that you have two versions of many useful functions. How muchof the language breaks if when running a piece of code at comptime that particular distinction is elided?