My last article about generic data structures in C was written to set the stage for today’s topic: A data structure that can be used in place of dynamic arrays, has stable pointers, and works well with arena allocators. It’s been independently discovered by different programmers over the years and so goes by different names. A 2001 paper called it a “levelwise-allocated pile” (bleh). Zig calls it a “Segmented List”. Then theres C++ with std::deque, which is only somewhat similar.| danielchasehooper.com
Background Andre Weissflog wrote an article in 2018 called “Handles are the better pointers”. In it he talks about how one can use handles instead of pointers when one wants to store permanent references to elements in an array. I think there are many nuances regarding handles that only become apparent after some real-world usage. Here we’ll look at an implementation in Odin and discuss it. I use the Odin Programming Language and the examples are game development-centric.| zylinski.se
If you are a game developer then you might have heard about data-oriented design. You might have read that programming in a data-oriented way can make your game run faster. However, if you come from some object oriented approach then the ideas you’ve seen can feel a bit overwhelming. It may seem like you need to completely redo all your gameplay code. Where do you even start? So let’s try to keep it simple.| zylinski.se
(This is part of a series on the design of a language. See the list of posts here.)| www.scattered-thoughts.net
(This is part of a series on the design of zest. See the list of posts here.)| www.scattered-thoughts.net