My impression of the sample programs is that they're unreadably noisy, but maybe this would be a good compiler target if you're writing your own language?
How would you write https://github.com/tspader/sp/blob/main/example/ls.c in your statically typed language of choice? To be fair, this is definitely the kindest example to my library, but one reason I felt this project was worth pursuing was that that example reads basically like a slightly worse TypeScript to me. In other words, quite nice for how low level the code really is.
const sp_fs_entry_t* a = (const sp_fs_entry_t*)pa;
const sp_fs_entry_t* b = (const sp_fs_entry_t*)pb;
return sp_str_compare_alphabetical(a->name, b->name);
Instead it would just be: return sp_str_compare_alphabetical(pa->name, pb->name)
With the correct types declared for the parameter types instead of void pointers.Or if you do need a cast, not having to write "sp_fs_entry_t*" twice in the same line because the local variable's type is inferred.
Maybe after reading C for a while, you don't see all the noise anymore?