Polymorphic ducks

It’s no secret C++ favours static polymorphism. But sometimes, runtime polymorphism is needed and suddenly we find ourselves down the virtual rabbit hole. Do not despair, for there are ways to avoid this madness.

I hate the virtual keyword. Inheritance fills me with a sense of dread. I can always quote half a dozen technical reasons to explain it. People much more smarter than me have discussed why it’s the worst form of composition.

Continue reading Polymorphic ducks

Meeting C++ 2017 trip report

I was at Meeting C++ 2017 to give a talk and then relax while listening to other speakers. That didn’t go exactly as planned.

About 6 months ago, I sent the abstract of one of my submissions to CppCon to my colleague Jonathan Boccara for advice. A few messages in the discussion he asks “did you also submit for Meeting C++?” and I admitted the thought hadn’t crossed my mind. To me, speaking at one conference like CppCon was already a big step and it would be redundant to propose the same talk at two different conferences anyway.

Continue reading Meeting C++ 2017 trip report

About leaky abstractions

There is one kind of leak that neither RAII nor garbage collection can fix, it’s abstraction leaks. The idea was coined by Joel Spolsky back in 2002 and remains one of my favourite computer science article.

The law of leaky abstractions by Joel Spolsky is one of the first technical article I encountered after I got my engineering degree and it remains one of the most influential to me.

Continue reading About leaky abstractions

Following-up on 'simplifying build in C++ (part 1)' and discussing API convergence

My previous post about simplifying build in C++ gathered some reaction but I feel that a significant part of them seemed to miss the point. In this follow-up, I try to explain why by laying out the recipes to make several APIs converge as one.

In Simplifying build in C++ (part 1), I tried to make the case for a unified build system interface that could be used by package managers to ease-up their developments and tackle some issues inherent to the current state of affairs.

Continue reading Following-up on 'simplifying build in C++ (part 1)' and discussing API convergence

Simplifying build in C++ (part 1)

Package management and build systems are one of the next big challenges C++ is going to face. In this article series, I offer some thoughts and ideas to solve that. This post is the first part, where I give an overview and try to tackle the first issue: interaction between package managers and build systems.

What is the first thing you do when you start a new project? Me, I install Google Test (or an equivalent) to make sure I have a decent test coverage from the start.

Continue reading Simplifying build in C++ (part 1)