3 ms·
the only memory safety gamedev needs are bound checking and use after free protections everything else is just bloat and noise that hurts iteration time and e
by Shadonototra 5y ago
the only memory safety gamedev needs are bound checking and use after free protections
everything else is just bloat and noise that hurts iteration time
and even if one would still value them, you'd need to check only once for whatever memory check you want to run, when you build your allocators for example, and not at every builds, and you could even write the logic yourself and have a debug allocator to ensure memory safeties
you want sub second and not "double digit seconds" build times
it takes one to try to make a game to trully understand why iteration time is far more important that anything else (other than performance of course)
you don't want to wait multiple seconds everytime you change the speed of your character, or tweak the rendering/AI code
that's why then some devs end up using scripting language and they loose all the advantages of their native language, because they want to speed up iteration time
that's why i personally stick to D for my game, my engine + game fully rebuild in under 1 second
you don't get to create memory bugs when you work on your gameplay code ;)
- pcwalton 5y ago> the only memory safety gamedev needs are bound checking and use after free protections Disagree, but in any case, we're talking about the fact that Zig doesn't provide use-after-free protection.
- Shadonototra 5y agoZig is allocator aware, use after free protection is covered with the ``GeneralPurposeAllocator``
- pcwalton 5y agoIs GeneralPurposeAllocator the one that quarantines memory forever? That isn't practical, as I've mentioned before. To name one problem, allocating 1 byte in a 4kB page leaks the entire page.
- littlestymaar 5y ago> the only memory safety gamedev needs are bound checking and use after free protections Probably if your game is single-threaded … Rust's raison d'être was type-check thread-safety, and even if we don't talk about this aspect much anymore it's still the domain where it has no competitors (Pony could have been, but didn't get traction). And it's invaluable.