CppCast Episode 204: Functional Programming in C++ with Ivan Čukić

Episode 204 of CppCast the first podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Ivan Čukić to discuss his book on Functional Programming with C++.

CppCast Episode 204: Functional Programming in C++ with Ivan Čukić

by Rob Irving and Jason Turner

About the interviewee:

Ivan Čukić is the author of "Functional Programming in C++" published by Manning.

He is one of the core developers of KDE, the largest free/libre open source C++ project.

He is also teaching modern C++ techniques and functional programming at the Faculty of Mathematics in Belgrade and has been using C++ for more than 20 years. He has been researching functional programming in C++ before and during his PhD studies, and uses the techniques in real-world projects.

The Power of Hidden Friends in C++--Anthony Williams

Did you know about them?

The Power of Hidden Friends in C++

by Anthony Williams

From the article:

"Friendship" in C++ is commonly thought of as a means of allowing non-member functions and other classes to access the private data of a class. This might be done to allow symmetric conversions on non-member comparison operators, or allow a factory class exclusive access to the constructor of a class, or any number of things.

However, this is not the only use of friendship in C++, as there is an additional property to declaring a function or function template a friend: the friend function is now available to be found via Argument-Dependent Lookup (ADL). This is what makes operator overloading work with classes in different namespaces...

Space Game: A std::variant-Based State Machine by Example--Nikolai Wuttke

Did you think to use it like that?

Space Game: A std::variant-Based State Machine by Example

by Nikolai Wuttke

From the article:

One of a powerful uses of std::variant is to implement State Machines. Some time ago I showed a simple example, but today we have something bigger. In today’s article by Nikolai Wuttke you’ll see how to leverage std::variant and build a space game!

A simple workaround for the fact that std::equal takes its predicate by value--Raymond Chen

Simple and efficient.

A simple workaround for the fact that std::equal takes its predicate by value

by Raymond Chen

From the article:

The versions of the std::equal function that takes a binary predicate accepts the predicate by value, which means that if you are using a functor, it will be copied, which may be unnecessary or unwanted.

In my case, the functor had a lot of state, and I didn’t want to copy it....