Hacker News new | ask | show | jobs
by Aurornis 19 days ago
That's the most eloquently diplomatic way to address it. He really does have a way with words.

At the same time, it makes me a little sad that when pressed, the best thing that could be said about Zig is that it's unapologetically weird right after a sentence about not agreeing with how they manage the project.

I had high hopes for Zig, but the current situation feels like they're actively moving toward being a niche language and away from being something that I could make a case for in a business context.

2 comments

> when pressed, the best thing that could be said about Zig is

What do you mean? We didn't really discuss technical aspects etc. and he said he does like how they manage the project.

> he said he does like how they manage the project.

That's the diplomatic part. He sidesteps the problems by saying that he doesn't agree with all of it (which leaves it ambiguous) but then pivots to praising the way they're unapologetic and weird.

> I don’t agree with all of it but I so respect that they are unapologetically weird.

The person you are replying to is on every Zig thread bashing it.
You must have me mistaken for someone else because that's not true on multiple levels.
> moving toward being a niche language and away from being something that I could make a case for in a business context

That indeed seems hard. Also, at this point in time, what would be the benefit of using Zig over Rust?

Simplicity, and a much easier transition from C. Zig very much takes an "extend (or as they actually say: maintain) it with Zig" philosophy, rather than the classic "rewrite it in Rust". Zig integration with C rivals that of C++. Rust can do it, but it introduces a lot of friction by design, and that friction may or may not be desirable for a given project.
Do you have any examples as to how Zig is more simple than Rust?

For the most part, I find Rust to be somewhat boring once you get past the initial learning curve of the borrow checker. It's almost uneventful code and reminds me a lot of writing code in F#.

The only area that Rust feels very friction-y can be with async programming, but basically no language except Erland and Elixir make that frictionless.

> Do you have any examples as to how Zig is more simple than Rust?

On the surface: just the scale of the things you're expected to know in order to program in Zig vs the scale of things you're expected to know to program in Rust. I read the entire Zig language reference[0] in an afternoon, and then started comfortably writing Zig. I have been wanting to find time to read the Rust language reference[1] for years, but I have never carved out the time to do it, in large part because it simply demands so much more time. I end up just limping along looking up everything when I touch Rust.

I know you're hoping for more concrete examples though, so I'll try to give a few.

- One of the more obvious ones coming from a Zig perspective is the comptime story. Comptime in Zig is super easy, Rust macros less-so.

- In Zig, C libraries can be directly imported and C functions can be called directly. Rust requires (? maybe wants is more accurate?) bindings written in Rust.

- You mention Erlang and Elixir have frictionless async, and while they are essentially async utopias, I would put Golang not terribly far behind. The latest release of Zig introduced an async API that is very close to Golangs async API; I described the parallels in this comment[2]. Zig is certainly no Erlang, but the standard async API is quite nice, even when comparing to languages beyond the scope of ones with minimal runtimes like Rust and Zig.

It's hard for me to go into much more detail than that because I don't really have enough experience with Rust to say much more with confidence.

[0] https://ziglang.org/documentation/0.16.0 (though it was 0.14.0 at the time I read it end to end)

[1] https://doc.rust-lang.org/1.49.0/reference/

[2] https://news.ycombinator.com/item?id=48636824

I’m curious: how did you get that link to the Rust reference? It’s to a five and a half year old version.
Oops, I found it here: https://doc.rust-lang.org/stable/reference/#rust-releases

I just assumed it was a stable link to the version being read (in this case, the latest stable version).

D and Swift integrate just as easily.

Also languages do not exist in isolation, thus the question remains what product will drive Zig adoption, beyond its core community.

> D and Swift integrate just as easily.

Sure, but those languages are not Rust, which was what was asked about.

> Also languages do not exist in isolation, thus the question remains what product will drive Zig adoption, beyond its core community.

The Zig team seems to be banking on providing an excellent build system that is useful beyond applications written in Zig to fill this role.