News for hackers. Stuff that matters.
Re:Zig, the Ideal C Replacement Or? by 90s_dev on Sunday May 11, 2025 @09:39AM (#43953759)
> My current take on this is to view Jai/Zig/Odin/etc. as attempted C forks, quite often motivated by hubris and coming with the usual inconvenience of forks, a lot of wasteful/redundant efforts put into small islands, each ruled by their own "benevolent" kings.

Didn't Rust do the same thing? We only call efforts wasteful until they become mainstream, then in retrospect we call it excitement driven prudence.

Anyway, is there an "Odin for C programmers" short guide, so I can learn it more quickly?

Re:Zig, the Ideal C Replacement Or? by stephc_int13 on Sunday May 11, 2025 @09:45AM (#43953793)
Rust is a bit different, more like a C++ replacement and heavily focused on so-called memory safety, but with IMO many bad design decisions, while I consider Zig/Jai/Odin as merely "meh" I think that Rust is bad.
Re:Zig, the Ideal C Replacement Or? by cadu2 on Sunday May 11, 2025 @10:03AM (#43953895)
Can you comment you some of these decisions in Rust that you feel are bad? I enjoy the language and have done quite a bit of work with it so I might be blinded/biased. I feel some warts here and there (async fns, anyone?), but overall the thing works and `cargo` is really a blessing.
Re:Zig, the Ideal C Replacement Or? by stephc_int13 on Sunday May 11, 2025 @10:32AM (#43954096)
Horrendous compilation time. Unnecessary complexity everywhere, basically C++ but worse.
Re:Zig, the Ideal C Replacement Or? by bonzini on Sunday May 11, 2025 @11:11AM (#43954346)
There's a lot less complexity in Rust than C++. Compilation times are mostly due to lack of compiled code reuse, which is bad but not unsolvable.
Re:Zig, the Ideal C Replacement Or? by const_cast on Sunday May 11, 2025 @08:18PM (#43958436)
> There's a lot less complexity in Rust than C++.

Eh, I don't know, I don't think so absolutely. I think in the general "application" paths yes there's less complexity but as a language overall, no.

The thing is Rust has all the same capabilities of C++, that is to say, everything. With that same strong emphasis on free abstractions - meaning, abstractions that do not cost anything more than if you wrote the implementation yourself.

Templates and stuff are a rabbit hole but if you go down the path of procedural macros and generics in Rust it's more of the same. It gets crazy, wild, and super complex. But most people don't have to worry about that, because these sort of "squeeze every last bit of juice" features are most useful for library authors.

Re:Zig, the Ideal C Replacement Or? by pdpi on Sunday May 11, 2025 @10:05AM (#43953906)
What about Rust's memory safety story justifies the "so-called" qualifier?
Re:Zig, the Ideal C Replacement Or? by stephc_int13 on Sunday May 11, 2025 @10:31AM (#43954087)
To be clear, the design is pretty solid. But the marketing and storytelling around it is BS.

This should be called hardening and the whole "unsafe" thing is also detrimental. Computer security and exploits is a highly complex topic, there are no silver bullets. Rust code is safer to some extent, but not "safe" from bugs and exploits.