Announcement: My first book, The Legacy Code Programmer’s Toolbox will be released in electronic format on February 1st, that is in two weeks from now. If you have to work with legacy code on a regular basis, this book will help you make it more expressive to your eyes by understanding it better. It will […]
Today’s guest post is written by Fernando J. Iglesias Garcia. Fernando is half software engineer, half junior researcher, interested in modern C++ and graph signal processing. Fernando can be reached online at @feriglegarc on Twitter and GitHub. Interested in writing for Fluent C++ too? Submit your guest post! Recently, a couple of colleagues and I participated […]
Today’s guest post is written by guest author JFT. Interested in writing on Fluent C++ too? Submit your guest post! In his 29 June 2018 blog post about C++ summer projects, Jonathan suggested seven more ways to get better at C++ during the summer of 2018. One of these was a project to implement ‘Title Case’ […]
The past few years have seen a boost in popularity of the functional programming paradigm. Languages that were used mostly in academic circles for decades are now in broader use amongst programmers. And every couple of months, another functional language hits the news and gets its trail of followers. Why is that? Functional programming allow […]
Some languages, such as JavaScript or Visual Basic, offer the feature of a timer, that is to say an object that calls some code at defined intervals. At the time of this writing (C++17) and to my knowledge, C++ doesn’t offer such a feature. A library called timercpp, that replicates in C++ this handy functionality […]
Ah, named arguments! If the term “feature envy” wasn’t already used to designate a refactoring, we would have employed it to talk about named arguments: it’s a feature that languages that don’t have it envy to the languages that do. Named arguments consist in specifying at call site the parameter names of the arguments passed. […]
Today’s guest post is written by Victor Zverovich. Victor is a software engineer at Facebook working on the Thrift RPC framework and the author of the popular {fmt} library, a subset of which is proposed into C++20 as a new formatting facility. He is passionate about open-source software, designing good APIs, and science fiction as […]
This is the final article in the series about function parameters. This series contains: Part 1: interface-level parameters, one-parameter functions, const parameters, Part 2: calling contexts, strong types, parameters order, Part 3: packing parameters, processes, levels of abstraction. To pack or not to pack? As a general rule, functions interfaces tend to become unclear when they […]
Let’s continue exploring how to design function parameters that help make both interfaces and their calling code more expressive. If you missed on the previous episode of this topic, here is what this series of articles contains: Part 1: interface-level parameters, one-parameter functions, const parameters, Part 2: calling contexts, strong types, parameters order, Part 3: packing […]
When you look at an function in an interface, 3 prominent things give you indications about how to use it: its name, its parameters and its return type. And when you look at a piece of code calling that function, it’s just its name and its function parameters. We’ve already covered in details how to […]