All posts in "Expressive code"

Indexing Data Structures with C++ Scoped Enums

Published January 15, 2019 - 0 Comments

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 […]

RestMyCase: A C++ Library for Formatting String Cases

Published January 8, 2019 - 0 Comments

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’ […]

Functional Programming Is Not a Silver Bullet

Published January 4, 2019 - 0 Comments
functional programming

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 […]

A Simple Timer in C++

Published December 28, 2018 - 0 Comments
timer C++

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 […]

Named Arguments in C++

Published December 14, 2018 - 9 Comments

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. […]

An Extraterrestrial Guide to C++ Formatting

Published December 4, 2018 - 0 Comments

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 […]

How to Design Function Parameters That Make Interfaces Easier to Use (3/3)

Published November 30, 2018 - 7 Comments

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 […]

How to Design Function Parameters That Make Interfaces Easier to Use (2/3)

Published November 27, 2018 - 8 Comments

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 […]

1 9 10 11 12 13 20