3 ms·
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.
by holonomically 5y ago
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.
- throwawaydsstr 5y agoWhat'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
- holonomically 5y agoThe best answer I can provide is this document: https://ziglang.org/learn/overview/ 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.
- pcwalton 5y agoZig is not memory safe, and is not meaningfully different from C and C++ in this way.
- ncmncm 5y agoAnyway, not meaningfully different from C.
- verdagon 5y agoI 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.
- dleslie 5y agoZig does not have a borrow checker and allows footguns with relative ease. It's a C replacement, after all. Sounds like you want Nim.
- the_only_law 5y agoD 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.
- holonomically 5y agoThat'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.