Live data from Hacker News

Zig 0.16.0 Release Notes

ziglang.org

21–30 of 44 posts

Re: Zig 0.16.0 Release Notes

#21

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?

If they knew what all of the 0.x breaking changes were going to be ahead of time they wouldn't need to be trying out different choices to see how well they really pan out!

Re: Zig 0.16.0 Release Notes

#22

Earlier 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?

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.

Re: Zig 0.16.0 Release Notes

#23
post #16

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?

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

#24
Really happy to see 0.16 come out.

I 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

#25
post #9
post #8

Earlier 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 )…

clap's derive is so nice

Re: Zig 0.16.0 Release Notes

#26

Earlier 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.

Yeah I don't understand why a language cannot automate something that routine and boilerplate-y.

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

#27
post #16

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?

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

Re: Zig 0.16.0 Release Notes

#28
post #16

Earlier 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

That is too much compiler magic for Zig folks.

Re: Zig 0.16.0 Release Notes

#29
post #16

Earlier 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

As plenty of other things in an "everything is explicit" language, whose goal is to be a safer C and nothing else.

The "module" system is another hack.

Re: Zig 0.16.0 Release Notes

#30
post #28

Earlier 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.

You know, I used to be annoyed by all your consistently shitty remarks in any zig related HN thread, but these days, it's refreshing to have an unpleasant interaction with a human.

Sincerely, thanks for all your hand-written hatred.

Post reply on HN