Pure Functions
Pure functions are pretty similar to mathematical functions. They are the reason that Haskell is called a pure functional programming language.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 656 entries already.
Pure functions are pretty similar to mathematical functions. They are the reason that Haskell is called a pure functional programming language.
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 […]
Higher-order functions are the pendant to First-Class Functions because higher-order functions can take functions as an argument or return them as a result.
One of the characteristics of functional programming is first-class functions. First-class functions behave like data and are heavily used in the Standard Template Library.
The definition of functional programming is relatively easy. Functional programming is programming with mathematical functions. Is that all? Of course, not!
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.
My favorite example, the dispatch table, shows how nicely the features in modern C++ work together. A dispatch table is a table of pointers to functions. In my case, it is a table of handles for polymorphic function wrappers.
This post continues our journey through the functional features of classical, modern, and future C++. Today, we stop in the present.
C++ is not a functional programming language, but you can program in a functional style. What are the functional features of C++? I will answer this question for C++98.
C++ is not a functional programming language. C++ has its roots in procedural and object-oriented programming. So it’s pretty surprising that programming in a functional style becomes increasingly important in C++. That is not only true for C++. That also holds for Python, which has many functional features, and even for Java. Now Java has […]