Have they said how many breaking changes requiring a rewrite Zig will be going through before it stabilises? Also I thought Zig doesn't have interfaces....how does the IO one work?
Zig 0.16.0 Release Notes
21–30 of 44 posts
Re: Zig 0.16.0 Release Notes
#22Earlier quoted context omitted.
Interfaces can still be expressed using vtables. You just have to write the vtable yourself rather than have the language do it for you. Also, Zig's tagged unions (enums with payloads in Rust) are really ergonomic and often what you want instead of interfaces. Alot of languages that use interfaces simply don't expose a good way of doing it so everyone reaches for interfaces by default. But if you don't need an actual…
Are there any plans to add syntax sugar for interacting with vtables?
Re: Zig 0.16.0 Release Notes
#23Have they said how many breaking changes requiring a rewrite Zig will be going through before it stabilises? Also I thought Zig doesn't have interfaces....how does the IO one work?
It has C style interfaces, meaning structs with function pointers. Which is basically how most device drivers in OSes that happen to be written in C, including UNIX flavours, work.
Re: Zig 0.16.0 Release Notes
#24I did a really tiny contribution about zig cc supporting -exported_symbols_list, which together with the hack of filtering out -liconv makes for a very viable linux -> macOS Rust cross-compiler. There's a few caveats but those have been manageable so far.
Absolutely in awe of Zig as a project.
Re: Zig 0.16.0 Release Notes
#25Earlier quoted context omitted.
This sounds interesting to me - could you elaborate a little on what things are in those proposals?
Sure, this is the issue tracking the work: https://codeberg.org/ziglang/zig/issues/30677 The idea is to offer some kind of CLI parsing in the std. It says minimal, but the discussion also veers into some more advanced options. The discussion resulted in two PRs (that I know of): - Type-driven : https://codeberg.org/ziglang/zig/issues/30677 @dotcarmen extracted it into a package ( https://codeberg.org/dotcarmen/clip )…
Re: Zig 0.16.0 Release Notes
#26Earlier quoted context omitted.
Are there any plans to add syntax sugar for interacting with vtables?
Sadly no, as fas as I'm aware. I can't think of creating vtables manually every time I need to create interfaces, I guess Zig is not for me.
Oh well, people like it so I won't judge, I'm happy we have choices for what languages we use. Just wish people would choose safe ones :/
Re: Zig 0.16.0 Release Notes
#27Have they said how many breaking changes requiring a rewrite Zig will be going through before it stabilises? Also I thought Zig doesn't have interfaces....how does the IO one work?
It has C style interfaces, meaning structs with function pointers. Which is basically how most device drivers in OSes that happen to be written in C, including UNIX flavours, work.
Re: Zig 0.16.0 Release Notes
#28Earlier quoted context omitted.
It has C style interfaces, meaning structs with function pointers. Which is basically how most device drivers in OSes that happen to be written in C, including UNIX flavours, work.
We all know that OP wasn't asking about THAT kind of interface and more "please create vtables for me" style of interface
Re: Zig 0.16.0 Release Notes
#29Earlier quoted context omitted.
It has C style interfaces, meaning structs with function pointers. Which is basically how most device drivers in OSes that happen to be written in C, including UNIX flavours, work.
That's a hack, not an interface lol
The "module" system is another hack.
Re: Zig 0.16.0 Release Notes
#30Earlier quoted context omitted.
We all know that OP wasn't asking about THAT kind of interface and more "please create vtables for me" style of interface
That is too much compiler magic for Zig folks.
Sincerely, thanks for all your hand-written hatred.