This is why the brush-clearing in std.posix concerns me. I don’t want to link in libc (by hand, mind you) in order to “just open a file”.
I keep bringing it up because 0.16 isn’t released yet. Putting that stuff back, so that there’s an alternative to Io, would be easy. Releasing a shiny new feature doesn’t have to mean deleting every other way to do similar things, in the same point release. I would argue, in fact, that in this case at least, it should not mean that.
100%. Whatever the response should be to 'the weirdest struct in the standard library", it should not involve radical changes to how structs work. Even if those radical changes are fully justified (they are not), that’s not the way to justify them.
All of them need all 106 pointers, I encourage you to read the entire list. This is a bigger deal than your statement suggests.
This is how I see it as well (“juicy” main, etc).
There’s a bit of the Questing Beast to it also. Zig’s original ‘colorless’ async was a really big deal, it was touted as a core innovation of the language, and it… didn’t quite work. It was regressed, Andrew seemed to think it could be resurrected in a release or two, and it wasn’t.
This is quite admirable. It takes strength to pull a tentpole feature like that, instead of just limping along with something that mostly works. I understand the focus on sticking the landing, and I don’t mind if it regresses some use cases in the process. 0.16 is not going to be the last Zig edition, it’s not even going to be the last Zig edition which starts with a naught.
Ok, here we go…
See, uh. This is the crux of it. As messy and tempestuous as async Rust has been, in Rust, async is an abstraction.
In Zig? Io is 106 function pointers wearing a trenchcoat.
I think we’re finally reaching the limits of that approach, right here, with Io. Zig is missing an affordance, it’s time to admit it and figure out how it should work.
Or, almost time. 0.16 isn’t out yet, so let the man cook! For what my opinion is worth, I think the approach to the problem, the API, the [drumroll] interface of Io, is very much the right thing.
It’s perfectly alright that the first release of that interface is built with what Zig can already provide. It’s actually a good thing, or it can be if the right decisions are made, because features should be implemented toward a goal, and the un-trenchcoating of the Io raccoon-pile is a great goal to guide that feature.
Just, pretty please, put posix.open back? I’ll still use Io, I promise!