Articles & Books

Wordlexpr: compile-time Wordle in C++20 -- Vittorio Romeo

This article shows a fully compile-time implementation of the popular game Wordle in C++20, and explains its inner workings:

wordlexpr: compile-time wordle in c++20

by Vittorio Romeo

From the article:

It felt wrong to not participate in the Wordle craze, and what better way of doing so than by creating a purely compile-time version of the game in C++20? I proudly present to you… Wordlexpr!

https://www.youtube.com/watch?v=wp3LPrhu2Sk

My favorite C++20 feature--Marius Elvert

Did you know?

My favorite C++20 feature

by Marius Elvert

From the article:

As I evolved my programming style away from mutating long-lived “big” objects and structures and towards are more functional and data-oriented style based mainly on pure functions, I also find myself needing a lot more structs. These naturally occur as return types for functions with ‘richer’ output if you do not want to use std::tuple or other ad-hoc types everywhere. If you see a program as a sequence of data-transformations, I guess the structs are the immediate representations encoded in the type system...

How to Use C++20 Modules with Bazel and Clang--Ryan Burn

Modules are coming.

How to Use C++20 Modules with Bazel and Clang

by Ryan Burn

From the article:

Modules are a feature added to C++20 that aims to provide better encapsulation and faster build times. While modules are not fully supported by compilers and probably not ready for use in production code, Clang’s support is fairly usable.

In this guide, I’ll show you how to use modules with Clang and the Bazel build system by making use of the project github.com/rnburn/rules_cc_module.

Let’s look at it works on a simple hello world program...

constexpr if--Rainer Grimm

Have you ever used it?

constexpr if

by Rainer Grimm

From the article:

In today's post, I want to introduce a very interesting C++17 feature: constexpr if. constexpr if enables it to conditionally compile source code and can also be used for nice tricks at compile time...

Why 4 Bloomberg engineers wrote another C++ book -- Tech At Bloomberg

This article features an interview to the four authors of the newly released "Embracing Modern C++ Safely" book, motivating the surprising decision to analyze C++11 and C++14 in-depth in 2021, and discussing the contents and style of the publication.

Why 4 Bloomberg engineers wrote another C++ book

Tech At Bloomberg

From the article:

But why do we need yet another C++ book? After all, one of the book’s principal authors, John Lakos, has already written two. And why now? Why Bloomberg? Who is this for? But first, why modern C++? [...] The authors limited the book to features with which they have accumulated more than five years of experience. The current edition is an authoritative summary of C++11 and C++14 features, and future editions are planned to cover C++17 and C++20.

(Note that "Embracing Modern C++ Safely" is on sale (up to 55% off) until February 26.)