3 ms·
Asking since I want to build a ray tracer and voxel engine in nim as a side project at some point. But I really like the approach of high level safety and optio
by FieryTransition 5y ago
Asking since I want to build a ray tracer and voxel engine in nim as a side project at some point. But I really like the approach of high level safety and optional low level performance from both languages. I was considering Rust, but I don't like having to deal with the borrow checker all the time.
- megameter 5y agoNim is a little bit more straightforward for writing application code, by dint of simply having more features to throw around. Both languages can be pretty darn fast, enough that I would not rate it as a factor for most applications, including rendering side projects - the speed difference we are talking about really has to do with how detailed your resource allocation methods are, and if you want that form of speed you have to invest time researching memory access patterns for your use case to get beyond educated guessing. So you would have to turn your voxel engine into full-time work to get to the point where it has both usefully broad functionality and top-end performance. Expect some maturity/stability issues with either one. Zig is much earlier in its lifecycle and I have seen showstoppers, but it's also been moving faster. Nim has struggled in the past with stabilizing its high-concept features - use it mostly like C and it's fine. Zig's biggest appeal is in how close it is to a fully bootstrapping environment - low level, clearly defined control over all resources is just what you want if you are writing a kernel.