An engineer recounts joining a studio that enforced an "Arkaned C++" discipline: keep compile-time niceties but radically restrict runtime C++. Exceptions, RTTI and heavy template metaprogramming were disallowed because they hide control flow or blow up build times; compile-time facilities like if constexpr, std::span and string_view were embraced. Runtime errors were split into recoverable Results (annotated nodiscard and propagated by early return) and contract violations that trigger an immediate panic with source location. Warnings were treated as errors and builds were farmed out because full rebuilds could take hours. The team traded the occasional expensive unwind for predictable per-call checks and a guaranteed worst-case latency.
Memory rules aimed for zero frame allocations: the engine reduced allocations to roughly a couple dozen per frame by using large thread stacks (≈20 MB main, +2 MB per worker), static caches, pools and explicit allocators, while banning global new/delete. Subsystem domain allocators and scratch buffers let leaks or peaks be confined and reset rather than crash the whole process. The approach imposed organizational and developer costs - more boilerplate, slower iteration and stricter reviews - but delivered predictable performance on consoles and, according to the author, contributed to very polished, unusual games.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.