| ▲ | jesse__ 10 hours ago | |
Hello, author here :) I've been thinking of doing a series of blogs on the journey but .. it's been a journey, which is a lot to write about in full. In short, a few places where I've been able to prefer simplicity: 1. Allocators are all pretty much as simple as you can get. Most memory in the program is bump/arena allocated. There is a buddy-style heap allocator for things that are annoying to arena allocate (strings that can be edited, for example). I make heavy use of temp memory and freelists. 2. Containers are all very straight-forward, and it's definitely a feature. The example I always give here is std::map from C++. On paper, it looks great; it has very good looking properties. In practice, the implementation is a nightmare; it's slow, and has a comically large rebalancing-shaped performance cliff. My containers strive to be simple, with reasonable average and worst-case performance. 3. I wrote my own metaprogramming language instead of using C++ template metaprogramming. Writing an entire programming language sounds like the antithesis of simplicity, but in reality, having a good metaprogramming layer makes your life immeasurably easier in the long run. With strong metaprogramming capabilities, stuff like realtime debug UI and state serialization becomes nearly trivial. Once you start doing versioned data serialization in C++, you quickly realize you need a better compiler (see: protobuf, cap'n proto) | ||