Haskell

C++17: New Parallel Algorithms of the Standard Template Library

The idea is quite simple. The Standard Template (STL) has more than 100 algorithms for searching, counting, and manipulating ranges and their elements. With C++17, 69 are overloaded, and a few new ones are added. The overloaded and new algorithm can be invoked with a so-called execution policy. By using the execution policy, you can specify whether the algorithm should run sequentially, parallel, or parallel and vectorized.

Read more
Tags: Haskell
Views: 79709

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: 90904

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: 27224

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: 37320

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: 71848

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: 37847

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: 32905

Immutable Data

A key to purely functional languages is that their data are immutable. Therefore, assignments such as x= x+1 or ++x are not possible in the purely functional language Haskell. The consequence is that Haskell supports no loops like for, while, or until. They are based on the modification of a loop variable. Haskell does not modify existing data; Haskell creates new data when needed and reuses the old ones.

Read more
Views: 28474

Functional in C++17 and C++20

Which functional feature can we expect with C++17, and for which functional feature can we hope with C++20? This is precisely the question I will concisely answer in this post.

Read more
Tags: Haskell
Views: 90488

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 4433

Yesterday 6193

Week 10626

Month 32300

All 12110509

Currently are 200 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments