Functional Programming using C++
4.5 (217 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,569 students enrolled

Functional Programming using C++

Write more robust and easier to maintain C++ code than ever before.
4.5 (217 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,569 students enrolled
Created by Tobias Hermann
Last updated 3/2018
English [Auto], Polish [Auto], 1 more
  • Romanian [Auto]
Current price: $16.99 Original price: $24.99 Discount: 32% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • You will be able to write code that is easy to understand and almost self-documenting.
  • You will be familiar with the background of functional programming and understand the fundamental differences of functional solutions compared to imperative ones.
  • You will be able to solve programming problems elegantly by composing functional tools only or mixing them with other paradigms.
  • You will spend much less time debugging your real-world applications because of their increased run-time safety.
  • You will be able to utilize multiple CPUs to improve the performance of your applications.
  • Your understanding of functional programming will help in other languages than C++ too. And it will expand your horizon regarding software engineering in general.
Course content
Expand all 27 lectures 01:35:14
+ Functional programming basics
4 lectures 24:13

You will learn the differences to imperative programming and why they matter.

Preview 08:22
Introducing functional programming
5 questions

You will see how even at the most basic level, your code can be improved immediately and how this renders some types of bugs impossible. Additionally you will be introduced to FunctionalPlus.

Preview 08:35

You will learn about the semantics of type annotations and why they are very useful.

Type annotations
Type annotations
3 questions

This lecture will highlight different benefits following from purely functional code.

Advantages of certain restrictions
+ Developing functional solutions
10 lectures 25:33

We will dive into a specific programming challenge and get a feel for concise code by writing in a functional style.

Programming challenge: Parse and product

You will learn to create and use anonymous functions and how to capture objects by value and by reference.

Lambdas and closures
Lambdas and closures
2 questions

This time we will develop a very expressive and elegant solution to the task of finding the longest edge of a polygon.

Programming challenge: Longest edge of polygon

You will see how something done with very good intentions can actually have a negative value.

The problem with comments

We will see if we can do even better than our previous solutions to the challenges and also solve something new.

High-level expressiveness and concise code

These two key concepts of functional programming will make our code even more concise and clear.

Currying and partial function application

You will learn how chained data transformation can be expressed in a nice and readable way.

Forward application

We will develop an example illustrating the similarities of functional programming and querying a database.

Programming challenge: An SQL analogy

We will check out how we can glue functions together in an even more concise way.

Function composition

We will develop two small command line tools and extract a useful reusable higher-order function from our code.

Programming challenge: Interacting with the command line
+ Thinking functionally
6 lectures 24:21

You will learn how to think functionally from the start when confronted with bigger, real-life programming problems.

Structuring your project cleanly

You will see one of the advantages of higher-order functions and pureness in action.


Once you know them, you will recognize them almost everywhere.


You will see how different error handling strategies arise and learn about their particular pros and cons.

Error handling

Functors - what they are are and how this concept helps us on our quest for good code.


In case you heard that monads are complicated, forget about it. You will not only see how they develop naturally, you will even learn how to implement one on your own.

+ Functional C++ in everyday usage
7 lectures 21:07

You will see how easy it is to refactor functional code, and how you can efficiently mix it with object orientated parts, even in an existing legacy code base.


Writing unit tests for pure functions is great.


You will see how performance bottlenecks can be identified.

Performance and profiling

Modern applications often have to handle many requests simultaneously or need to scale to multiple CPUs to increase performance. You will learn how to manage these demands in a straightforward way.


If you have the feeling that some classical object oriented design patterns are unnecessary convoluted, you are right. You will utilize your new functional programming skills to make some of them vanish into thin air.

OOP Design patterns vanishing

Functional programming seems to have a bright future in the C++ community. You will learn about available libraries and how your new skills are universal in regards to them.


Finally we will have a look at how the C++ standard might change in the future and how C++ will provide more and more functional tools out of the box.

Outlook and conclusion
  • You should have some experience in programming with C++.
  • Previous experience with functional programming is not necessary.
  • A C++14-compatible compiler is needed.

Controlling complexity is one of the biggest challenges a developer faces. Functional programming helps tremendously with this and thus becomes more and more popular, even in originally imperative and object oriented languages like C++. This course will help you increase your productivity by teaching how to write functional C++ code that is easy to understand, test and reuse.

After mastering the basic building blocks of functional programming, you will learn how to think functionally and solve everyday programming problems in an elegant way. Every provided coding exercises comes with an exemplary solution.

At the end of this course you will be able to use the functional approach to write application code that is extraordinarily robust and pleasant to work with.

And as a bonus, all the concepts you have learned will not only help you when using C++, but are applicable to other programming languages too and will expand your horizon regarding programming in general.

Who this course is for:
  • This course is for all C++ developers (intermediate and advanced) who want to improve the quality of the C++ code they produce by learning about and applying functional programming principles.