When programming in Odin you can use arena allocators. If you use an arena allocator combined with a dynamic array, then there are a couple of pitfalls that may not be apparent at first. Let’s look at what arenas are, how you can run into trouble when naively using them with dynamic arrays and what you can do instead. What’s an arena? How does it work? Arenas and arena allocators are useful for grouping allocations that have the same lifetime.| zylinski.se
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
Learn the Odin Programming Language and demystify low-level programming| odinbook.com
In this post I’ll share some details on how I wrote the first book about the Odin Programming Language. I’ll talk about how I got started, what the process was like, as well as some technical things related to writing programming books. This book is called “Understanding the Odin Programming” language. It’s a digital book (HTML and EPUB). It was released on December 6, 2024. The book is available at https://odinbook.| zylinski.se