Articles & Books

C++ ... in 2018 -- Bartłomiej Filipek

cppin2018.PNGA retrospective of all the things that happened in C++-dom in 2018:

C++ ... in 2018

by Bartłomiej Filipek

From the article:

2018 is almost over (just a few hours left in Poland till midnight). As in previous years, I did a summary of many things that happened in the C++ community. This year seems to be marked with a solid progress towards the standardisation of C++20, using more and more C++17 and as always the growth in the community.

Let’s have a look...

TODO_BEFORE(): A clean codebase for 2019 -- Aurelien Regat-Barrel

2019.PNGMay your new years ever be happier than your old years -- now there's a great use for a monotonically increasing function!

Here is the latest uplifting contribution, with thanks to the Fluent C++ blog:

TODO_BEFORE(): A clean codebase for 2019

by Aurelien Regat-Barrel

From the article:

How and why do we accumulate technical debt in the first place? How do we find ourselves in a situation where things seem to be out of control? And more importantly: how to recover and improve from such a situation? ...

How To Parallelise CSV Reader with C++17 - new chapter in C++17 in Detail

Just before Holiday Break, I've added a new chapter to my book:

How To Parallelise CSV Reader with C++17 - new chapter in C++17 in Detail

By Bartlomiej Filipek

From the new chapter:

In the new chapter, you’ll see how to build a tool that works on CSV files, parses lines into sales records and then performs calculations on the data. The code uses many C++17 features. You’ll see how easy it is to add parallel execution to selected algorithms and have a performance improvement across the whole application. In the end, we’ll discuss problems that we found along the way and possible future enhancements.

A brief introduction to Concepts – Part 1--Glennan Carnie

Useful new feature.

A brief introduction to Concepts – Part 1

by Glennan Carnie

From the article:

Concepts allow us to express constraints on template types with the goals of making generic code

  • Easier to use
  • Easier to debug
  • Easier to write

In this pair of articles we’ll look at the basics of Concepts, their syntax and usage.  To be open up-front:  this article is designed to get you started, not to make you an expert on Concepts or generic code...

Did anybody consider adding a language pragma to C++?

Interesting question.

Did anybody consider adding a language pragma to C++?

From the article:

For people who don't know, language pragmas are the way that ghc (Glasgow Haskell Compiler) allows you to turn on and off language features. In C++, this would mean that I can write something like:

#language <no_c_style_cast>

And that would disable C-style cast for that source file. Don't you think that it would be useful to standardize this to allow people to willingly disable some old legacy C++ features in newer code?

The SoA Vector – Part 1: Optimizing the Traversal of a Collection--Sidney Congard

It's all for speed.

The SoA Vector – Part 1: Optimizing the Traversal of a Collection

by Sidney Congard

From the article:

I like C++ because it offers a good compromise between writing expressive and fast code. But, I discovered a problem where I didn’t know any way to hide the implementation detail away from its use: The “Structure of Arrays” (SoA) versus the “Array of Structures” (AoS) problem.

This is the first part of a series of two articles:

  • what ‘SoA’ is about and what benefits it brings (part 1)
  • how to implement an SoA vector in C++ (part 2)

So let’s see what those SoA and AoS are all about...

Overload 148 is now available

ACCU’s Overload journal of December 2018 is out. It contains the following C++ related articles.

Overload 148 is now available

From the journal:

Revolution, Restoration and Revival.
Trends cycle in seasons. Frances Buontempo wonders what programmers should on the lookout for.

Diseconomies of Scale.
Bigger is not always better. Allan Kelly considers when smaller is more productive.

Flip Model: A Design Pattern.
Publishing dynamic, complex data to many clients in a threadsafe manner is challenging. Daniele Pallastrelli presents the Flip model pattern to overcome the challenges.

Memory Management Patterns in Business-Level Programs.
There are many memory management patterns. Sergey Ignatchenko considers these from an application level.

Compile-time Data Structures in C++17: Part 3, Map of Values.
A compile time map of values allows code to be tested more easily. Bronek Kozicki demonstrates how to avoid a central repository of values.

Algol 68 - A Retrospective.
Algol 68 has influenced programming languages in many ways. Daniel James reminds us just how many.

Measuring Throughput and the Impact of Cache-line Awareness.
How do you measure throughput? Richard Reich and Wesley Maness investigate suitable metrics.

Stop with the CTAD FUD!--Colby Pike

It's not cool.

Stop with the CTAD FUD!

by Colby Pike

From the article:

Among the catalog of features introduced by C++17, you’ll find a feature known as Class Template Argument Deduction, often shortened to “CTAD”. It was one of the largest language changes in C++17, and with it comes a new syntax and a new set of rules to understand.

It’s still very early in the game for CTAD, but we’re already seeing many strong opinions about it without seeing its widespread effect on codebases. In particular, we’re seeing a lot of Fear, Uncertainty, and Doubt about CTAD...