Live data from Hacker News

Zig feels more practical than Rust for real-world CLI tools

dayvster.com

51–60 of 412 posts

Re: Zig feels more practical than Rust for real-world CLI tools

#51
This is a really bad take, on par with the "we don't need types" post from last week.

The thing I wish we would remember, as developers, is that not all programs need to be so "safe". They really, truly don't. We all grew up loving lots of unsafe software. Star Fox 64, MS Paint, FruityLoops... the sad truth is that developers are so job-pilled and have pager-trauma, so they don't even remember why they got in the game.

I remember reading somewhere that Andrew Kelley wrote zig because he didn't have a good language to write a DAW in, and I think its so well suited to stuff like that! Make cool creative software you like in zig, and people that get hella about memory bugs can stay mad.

Meanwhile, everyone knows that memory bugs made super mario world better, not worse.

Re: Zig feels more practical than Rust for real-world CLI tools

#52

[flagged]

I can guarantee you that none of it was written by ChatGPT or any other LLM.

As for the Ads, even though it's my site, I'd urge you to turn on adblocker, pi-hole or anything like that, I won't mind.

I have ads on there yes, but since I primarily write tech articles for a target audience of tech people you can imagine that most readers have some sort of adblocker either browser, network or otherwise.

So my grand total monthly income from ads basically covers hosting costs and so on.

Re: Zig feels more practical than Rust for real-world CLI tools

#54

IMO, as a C++ developer, Swift makes the most sense to me if I were looking for a safer alternative. I think people prefer what's familiar to them, and Swift definitely looks closer to existing C++ to me, and I believe has multiple people from the C++ WG working on it now as well, supposedly after getting fed up with the lack of language progress on C++. The most recent versions gained a lot in the way of cross-platf…

Can you share some swift resources so I can look into the features of swift compared to zig and C?

https://www.douggregor.net/posts/swift-for-cxx-practitioners...

Re: Zig feels more practical than Rust for real-world CLI tools

#55

[flagged]

I’m not an idiot! However, 3 months ago me was clearly an idiot judging from the utter crap he wrote. Me in 3 months is also an idiot, he won’t get the greatness of these genius hacks I’m making.

I'm not an idiot either. But past and future me get to be idiots from time to time. Alcohol and lack of sleep are a helluva mind cripplers.

Re: Zig feels more practical than Rust for real-world CLI tools

#56
This article seems pretty confused about what the borrow checker does or does not do - I've never heard compile time enforcement listed as a negative of the borrow checker before. It might do the author good to try writing some (non-trivial) memory management in both Zig and Rust some time.

Re: Zig feels more practical than Rust for real-world CLI tools

#57
post #33

The benefit of Zig seems to be that it allows you to keep thinking like a C programmer. That may be great, but to a certain extent it’s also just a question of habit. Seasoned Rust coders don’t spend time fighting the borrow checker - their code is already written in a way that just works. Once you’ve been using Rust for a while, you don’t have to “restructure” your code to please the borrow checker, because you’ve a…

> Seasoned Rust coders don’t spend time fighting the borrow checker My experience is that what makes your statement true, is that _seasoned_ Rust developers just sprinkle `Arc` all over the place, thus effectively switching to automatic garbage collection. Because 1) statically checked memory management is too restrictive for most kinds of non trivial data structures, and 2) the hoops of lifetimes you have to go to t…

This is exactly the opposite of what he’s saying, using Arc everywhere is hacking around the borrow checker, a seasoned rust developer will structure their code in a way that works with the borrow checker; Arc has a very specific use case and a seasoned rust developer will rarely use it

Re: Zig feels more practical than Rust for real-world CLI tools

#58
post #27

Earlier quoted context omitted.

The amount of seggfaults I have seen with Ghostty did not raise my spirits.

segfaults raise my belief in spirits

Possibly a good Halloween costume idea to go as a segfault. It would scare some people.

Re: Zig feels more practical than Rust for real-world CLI tools

#59

This is a really bad take, on par with the "we don't need types" post from last week. The thing I wish we would remember, as developers, is that not all programs need to be so "safe". They really, truly don't. We all grew up loving lots of unsafe software. Star Fox 64, MS Paint, FruityLoops... the sad truth is that developers are so job-pilled and have pager-trauma, so they don't even remember why they got in the gam…

Uh I'm confused, so you think my take is bad because memory safety should not matter ?
Post reply on HN