Les Imbroglios d'Alexis Breust

De l'impro sans bugs et du code lâcher-prise.
Aft design pattern: pimpl with no p

I was sure that the pimpl design pattern was an interesting thing. It was made so that one can hide compile-time dependencies to the end-user, allowing faster compile times.

However, as you know, pimpl starts with a p. And that's the big issue: pointers. So having a nice API implies memory fragmentation and cache misses? Surely, no!

Let me present you the Aft pattern, a pimpl with no p!

Game Programmers and the C++ collapse

Everyone with little experience will tell you: if you want to program your own game engine, C++ will allow you to get the performances you need. Indeed, C is missing high-level quality-of-life features, and there are no other practical choices.

Well, that state of mind is changing among game developers.

Let's focus on why C++ is slowly digging his own grave.

C++ enum to string: the Macros Way

Ever now and then, I find myself looking for a way to log an enum. Fun fact is, even if it is easy to actually log it, it is hard to maintain. Having to keep a switch instruction in sync with code content, or generating a new file during a pre-build step, is not exciting. We can do better, right?

Design Patterns: pimpl in C++

lava uses multiple design patterns, but any usage of those are driven by two core principles:

  • do not show more than needed ;
  • keep performances in mind.