3 ms·
Interesting read and I agree that growth in technical debt is something to worry about. I want to get more involved and been trying my best to learn the skills
by sandwichbop 5y ago
Interesting read and I agree that growth in technical debt is something to worry about. I want to get more involved and been trying my best to learn the skills needed but there’s so much to consider that it’s a bit overwhelming. I’m not familiar with Zig, it’s neat that it has a toolchain that can compile C/C++ but it reminds me a lot of Nim. Could someone explain to me some differences between the two and why you would pick Zig over the other besides personal preference?
- cassepipe 5y agoI'd say Zig wants is really serious on wanting to be a better C, that is have the same (better?) access to bare-metal, memory and bits but with a better type system and error management and without C's footguns and cruft (build system, memory errors, preprocessor). I don't know Nim that well but it seems more ambitious and seems to cater to be more "general purpose" if that means anything. For example there's no hidden flow control in Zig.
- habibur 5y agoNim is garbage collected, thus is a higher level language but doesn't fit the high performance low overhead of "systems programming" requirement. While Zig is manual memory managed like C and nearer to the core, but harder to program.
- sa1 5y agoWith ARC, Nim's memory management would be closer to Rust than to Go.
- michaelsbradley 5y agoI think the maintainers of Nim would disagree with your assessment given that the first sentence on the front page of Nim's official website is: "Nim is a statically typed compiled systems programming language." As someone else pointed out, when using Nim with its ARC/ORC and move semantics (which will eventually be the default), it's closer to Rust than to Go. That being said, Nim's current default GC does well for many kinds of workloads. If it's really causing a performance problem, it's possible to disable it and manage memory manually (or use a different language for the task at hand, of course).
- goodpoint 5y agoNot at all: Nim always targeted system programming. Even before the new ARC/ORC, the GC was optional and done independently in each thread.
- pjmlp 5y agohttps://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Kernel.Mod.txt https://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Kerne... https://tinygo.org/ https://tinygo.org/ https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc
- nimmer 5y agoNim targets all the architectures that GCC targets, including less common microcontrollers.