All posts in "Expressive code"

How to Output Strings Separated by Commas in C++

Published May 7, 2019 - 0 Comments
string separated comma C++

Every once in a while we all face that problem: how to output strings separated by commas (or by any other character), and not have a comma appear after the last one? Or rather: how to avoid writing a comma after the last string AND keep the code clean of the annoying bookkeeping that this […]

Curried Objects in C++

Published May 3, 2019 - 0 Comments

Curried objects are like facilitators. They consist in intermediary objects between a caller and a callee, and helps them talk to each other in a smooth way. This ability makes the code simpler and easier to read. While having seen and used the pattern at various places, the first time I encountered the actual term […]

The Common Vocabulary of Software Developers

Published April 30, 2019 - 0 Comments
common vocabulary software developers

Writing expressive code is putting together code that conveys our intents, for other people to understand them. And the thing with code is that it tends to lasts. So what you write today in your codebase is like a letter that you address to people living in the future. Those people include all the developers […]

Beyond Locks, a Safer and More Expressive Way to Deal with Mutexes in C++

Published April 26, 2019 - 0 Comments

Today’s post is written by Louis-Charles Caron. Louis-Charles is a software engineer at Advanced Silicon, working on image processing for low latency human-machine interaction. Fan of coding, Louis-Charles enjoys programming in Python and C++ and likes to design tools to build faster, more intuitive software. He dived into multi-threading a couple of years ago and […]

The Rule of Zero in C++

Published April 23, 2019 - 0 Comments
rule of zero

  Now that we’re clear on the Compiler-generated Functions, the Rule of Three and the Rule of Five, let’s put this to use to reflect on how to use the “= default” feature to have expressive and correct code. Indeed, C++11 added the possibility to require from the compiler that it write a default implementation for […]

How to Emulate the Spaceship Operator Before C++20 with CRTP

Published April 9, 2019 - 0 Comments

Today’s post is written by Henrik Sjöström . Henrik is currently working at Starcounter building an SQL queryprocessor. He enjoys working on algorithmically complex issues and prioritises expressive code so the actual problem is visible rather than hidden by hard to follow code. Making a class comparable is usually something of a chore. In C++20 […]

Generalizing Unordered Named Arguments

Published March 22, 2019 - 0 Comments

Today’s guest post is written by Till Heinzel. Till is a physicist-turned-software developer at Luxion Aps in Denmark, who is very interested in expressive C++ and the growth of the language in a more expressive direction. Till can be found online on LinkedIn. First off, I would like to thank Jonathan for creating FluentCpp and […]

1 8 9 10 11 12 20