Writing pythonic C++

Python doesn’t have a switch statement. Some people will tell you to use a chain of if … else statements instead but this can look ugly. One elegant construct to use is a dictionary whose keys are the switch options and corresponding values are functions (lambda or otherwise) that execute appropriate actions. It’s all pretty… Read More Writing pythonic C++