Entries by Rainer Grimm

Pdf Bundles

I have written more than 130 posts on this blog. I covered the topics of multithreading, embedded, and functional programming in modern C++. I think a lot of my posts are quite good. Even better than the books I have written. So I had an idea.

Expression Templates

Expression templates are “structures representing a computation at compile-time, which are evaluated only as needed to produce efficient code for the entire computation” (https://en.wikipedia.org/wiki/Expression_templates). As needed, now we are at the center of lazy evaluation and the center of this post.

C++ is Lazy: CRTP

In my previous post, Recursion, List Manipulation, and Lazy Evaluation, I wrote about the characteristics of functional programming:  The story about lazy evaluation in C++ is short. Sorry to say, but I have forgotten templates. The two advanced techniques, CRTP and expression templates, are based on lazy evaluation.