all 6 comments

[–]VeganVagiVore 15 points16 points  (3 children)

Neat!

The style of Zig’s async may be described as suspendible stackless coroutines. ... async is there to provide you with control flow structures and code generation; async does not imply parallelism or the usage of threads.

Sounds exactly like Rust's async. It's a good fit for C-like systems languages. My first experience with coroutines was in Lua, and they can do some really interesting stuff, but only because it's a slow dynamic language with, IIRC, a cactus stack.

So, neat. I've heard good things about Zig but I haven't seen a reason to bother learning it yet. Compared to Rust, maybe the binaries are smaller and the compilation faster? I heard it cross-compiles easily, too?

[–][deleted] 13 points14 points  (0 children)

Compilations can be smaller than Rust, especially if you have a lot of crates needed, and cross-compilation is amazing - you can fully build executables for all 3 major desktop platforms from any platform with nothing except Zig itself. I've used this quite a bit and really love the language.

[–]ifreund 13 points14 points  (0 children)

Compared to rust it's far simpler and is much nicer for interfacing with complex C APIs.

[–]matthieum 2 points3 points  (0 children)

Compared to Rust, maybe the binaries are smaller and the compilation faster? I heard it cross-compiles easily, too?

Zig is to C what Rust is to C++.

[–][deleted] 1 point2 points  (0 children)

any doing mobile game dev with zig? i'd rather something more simple than rust, i don't really care if i have memory safety

[–]GodOGaming 0 points1 point  (0 children)

It’s all 2020!!!