The Visitor pattern and multiple dispatch

Today I’ll talk about multiple dispatch, a programming language feature that increases flexibility of method calls and eliminates the need for awkward pattern constructions, at the cost of some additional complexity in the dispatch algorithm. The Visitor pattern Those who have read the Gang of Four’s seminal Design Patterns may recall the Visitor pattern. Its…

14

Stop writing header files

Although one of my favorite languages, C++ has a number of issues that make it difficult to write and maintain. One of the worst is its compilation model: you import declarations using fragile literal text inclusion (#include), and you have to waste your time keeping these declarations redundantly in sync with the source files. Templated function definitions…

5