Placeholders - The Second

The unification of templates, concepts, and placeholders goes on. This time, I will look closely at constrained (concepts) and unconstrained (auto) placeholders in the context of templates.

Read more
Views: 19950

Concepts - Placeholders

C++11 has auto unconstrained placeholders. You can use concepts in C++20 as constrained placeholders. What seems at first glimpse not so thrilling is for me the decisive quantum leap. C++ templates will become an easy to use C++ feature.

Read more
Tags: Concepts
Views: 25439

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.

Read more
Views: 53092

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.

Read more
Tags: CRTP, Python
Views: 126166

Monads in C++

Monads in C++? What a strange name for a post. But it's not so strange. With std::optional, C++17 gets a monad. The ranges library from Eric Niebler and the extended futures are also monads. For both, we can hope for in C++20.

Read more
Views: 90597

Concepts

We stay in the year 2020. With high probability, we will get concepts. Of course, waterproof statements about the future are challenging, but the statement is from Bjarne Stroustrup (Meeting C++ 2016 at Berlin).

Read more
Views: 27162

The New Ranges Library

A small-time jump, and we are in the year 2020. C++ will get - as far as the future is predictable - the new ranges library. Thanks to Eric Nieblers library, working with the Standard Template Library (STL) will become more comfortable and powerful.

 

Read more
Views: 37241

Fold Expressions

With fold expressions, you can implement Haskell functions foldl, foldr, foldl1, and foldr1 directly in C++. These four functions successively reduce a list to a single value.

Read more
Views: 71711

Recursion, List Manipulation, and Lazy Evaluation

The remaining three characteristics of functional programming are told quite quickly: Recursion, manipulation of lists, and lazy evaluation.

Read more
Tags: Haskell
Views: 37731

Pure Functions

Pure functions are pretty similar to mathematical functions. They are the reason that Haskell is called a pure functional programming language.

Read more
Tags: Haskell
Views: 32760

Stay Informed about my Mentoring

 

Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 3779

Yesterday 4371

Week 39586

Month 169711

All 12057477

Currently are 162 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments