Re:Ask HN: Alternatives to Rust Programming Language
by holonomically on Monday November 22, 2021 @01:34PM
(#29309967)
Zig and Nim are good bets. Both are pushing the state of the art forward on what is possible with system programming languages. D is probably another good bet.
[ Parent
| on HN ]
Re:Ask HN: Alternatives to Rust Programming Language
by the_only_law on Monday November 22, 2021 @02:10PM
(#29310392)
D seems really neat to me. I didn’t realize just how wide the language was until a few years ago.
I thought it was just a C, but a little nicer and then I learned it had all sorts of stuff, like an actor framework built in.
Re:Ask HN: Alternatives to Rust Programming Language
by holonomically on Monday November 22, 2021 @02:43PM
(#29310774)
That's news to me. I didn't know D had actors but I like it's meta-programming features because it cuts down on all sorts of boilerplate. I haven't used it that much, I just looked into it briefly for some low-level programming projects.
Re:Ask HN: Alternatives to Rust Programming Language
by throwawaydsstr on Monday November 22, 2021 @01:56PM
(#29310234)
What's the state of safety in zig? does it allow footguns like in C/C++ ? What about borrow checker(it makes program safe. isn't it?)?
I would like to know advantages as well
Re:Ask HN: Alternatives to Rust Programming Language
by dleslie on Friday November 26, 2021 @11:52AM
(#29351830)
Zig does not have a borrow checker and allows footguns with relative ease. It's a C replacement, after all.
Sounds like you want Nim.
Re:Ask HN: Alternatives to Rust Programming Language
by pcwalton on Monday November 22, 2021 @03:02PM
(#29310975)
Zig is not memory safe, and is not meaningfully different from C and C++ in this way.
Re:Ask HN: Alternatives to Rust Programming Language
by ncmncm on Monday November 22, 2021 @03:32PM
(#29311276)
Anyway, not meaningfully different from C.
Re:Ask HN: Alternatives to Rust Programming Language
by verdagon on Monday November 22, 2021 @05:47PM
(#29312521)
I believe it has release-safe mode, which protects against most use-after-free. This is sufficient safety for most applications, IMO.
I only see it getting safer from here, with some advances on the horizon, such as memory tagging. The language has a lot of potential.
Re:Ask HN: Alternatives to Rust Programming Language
by holonomically on Monday November 22, 2021 @01:58PM
(#29310260)
The best answer I can provide is this document: https://ziglang.org/learn/overview/. It covers the main features of the language and how they compare to other languages like C, C++, and D. I personally think it has enough features like option types instead of null pointers, array bounds checking, generics, compile-time code execution, etc. for writing safe code but others might disagree.