This is obviously valuable for library authors. It will be valuable sometimes for application authors, but less obviously and less often.
I think for a “replaces C” language, these are legitimate concerns. One of the things C really got right is exactly an abstraction (not much of one! but an abstraction) across operating system primitives.
I’m on team “let’s see how this works out”, around Io generally. As far as the kitchen-sink effect is concerned, it’s tracked and that’s enough for me.
As a sanity check, I built a little CLI tool which uses some zg data, under ReleaseSmall, before and after Zig 0.16, using juicy main. Before is 273KiB, after is 375KiB: a 102KiB ‘penalty’, if you want to call it that. Before, I had a pretty small program, after, I have a pretty small program, just, not quite as small. About 150KiB of both is just data tables, but I would expect that hundred K to be a constant: a bigger chunk of very small programs, and a smaller piece of bigger ones.
Something I could translate as “removing the cross-platform primitives makes Zig less ‘C-like’, and I would like the option to continue programming that way”: I think that’s worth bearing in mind. Maybe it fades, maybe it doesn’t.
You got some good answers to “why not comptime known”, but I hope, at least, that the “secret third thing” option will be seriously considered.
It’s possible that “we’ll add restricted function types and that will get the dispatch penalty back” is going to work. It’s not clear to me that this is the solution which really cuts the problem along the joints. Using a “pattern” for runtime polymorphism is maximally flexible, but it has one obvious downside: you can’t actually tell the compiler what you’re up to, so it has to optimize in ignorance of that intention.
Finding a way to introduce the type system to what we’re doing has, in the past, proven elusive: many proposals, none good enough. But we’ve gained more experience with how to do it by hand, and what the consequences are, and maybe the question should be revisited using that experience.