Remix.run Logo
▲ simjnd 2 days ago

Zig's tooling is very good, so is the cross-compatibility story and tagged unions.

But while you can have some/most of the benefits Zig has from modern C, I think an underrated benefit is the language culture. As a different language it was the opportunity for a reset, e.g. it's idiomatic Zig to pass allocators to functions, meaning every library in Zig will work this way.

You could do that in C, but none or very few libraries do that so whenever you reach out to third-party dependencies (which is not a lot, in C as in Zig) you have to fight against C's traditional patterns.

▲wolvesechoes 2 days ago | parent [-]

> Zig tooling is very good

People say the same about Rust, and seems tooling for you all mean "convenient cli program" and not "vast IDE support, debuggers, qualified and platforms-specific toolchains, formal verification software".

In those C blows Zig, even Rust, out of the water.

▲simjnd a day ago | parent | next [-]

> People say the same about Rust

Irrelevant, Zig has nothing to do with Rust. Rust tooling is slow and bloated and comes in ten different pieces you have to install separately.

> Tooling for you all mean "convenient cli program"

Don't put words in my mouth, you clearly have no idea what I mean by good tooling

> Platforms-specific toolchains

With Zig you don't need platform specific toolchains, in-fact a lot of non-Zig C projects (e.g. Uber) use the Zig toolchain just to have hassle-free cross-compilation. It's one statically linked binary you can use (that consequently works flawlessly on any linux distro irrespective of glibc version) and includes clang, linker, and libc headers for every target. You don't need to reach for Docker or sysroots. That's just one of the reasons that make it good.

C will always blow every single language out of the water in support at least because it's the historical and universal programming language. It doesn't mean it's a better designed language.

▲wolvesechoes a day ago | parent [-]

[flagged]

▲simjnd a day ago | parent [-]

Pettiness is off the charts

▲shishir7days 2 days ago | parent | prev [-]

[flagged]