Live data from Hacker News

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

dayvster.com

411–412 of 412 posts

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

#411

Earlier quoted context omitted.

Just understanding the rules are not enough, you also need to be consistently good so that you never make a mistake that gets into production. On both your average days and your bad days. Over the 40 to 50 years that your carer lasts. I guess those kind of developers exist, but I know that I'm not one of them.

I am pretty confident that a language with syntax that allows you to feel that freedom that C gives you AND is safe to write software with (without garbage collection) is possible, we just need to come up with a reasonable syntax that has both of those features. It won't look like C or Go or any of that, I don't think. I am not a computer scientist (I have no degree in CS) but it sure seems like it would be possible…

Everything you wrote sounds like Rust, except that you didn't want it to be Rust :).

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

#412
post #129

Earlier quoted context omitted.

I think the problem the practical programmer has with a statement like this is the implication that only certain languages require some basic understanding and a bit of discipline to avoid CVEs. Rust's model has a strict model that effectively prevents certain kinds of logic errors/bugs. So that's good (if you don't mind the price). But it doesn't address all kinds of other logic errors/bugs. It's like closing one do…

Actually, the strong type system is often why people like to write Rust. Because encoding logic invariants in it also helps to prevent logic bugs! There is a significant crowd of people who don't necessarily love borrow checker, but traits/proper generic types/enums win them over Go/Python. But yes, it takes significant maturity to recognize and know how to use types properly.

To the extent that one of the most common things rust users wish for is Rust, but without the borrow checker.
Post reply on HN