Learning C++ Functional Programming

Apply Functional Programming techniques to C++ to build highly modular, testable, and reusable code
Preview in Mapt

Learning C++ Functional Programming

Wisnu Anggoro

1 customer reviews
Apply Functional Programming techniques to C++ to build highly modular, testable, and reusable code
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning C++ Functional Programming Book Cover
Learning C++ Functional Programming
$ 39.99
$ 28.00
Functional Programming in C# - Part 3 [Video] Book Cover
Functional Programming in C# - Part 3 [Video]
$ 124.99
$ 106.25
Buy 2 for $35.00
Save $129.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781787281974
Paperback304 pages

Book Description

Functional programming allows developers to divide programs into smaller, reusable components that ease the creation, testing, and maintenance of software as a whole. Combined with the power of C++, you can develop robust and scalable applications that fulfill modern day software requirements. This book will help you discover all the C++ 17 features that can be applied to build software in a functional way.The book is divided into three modules—the first introduces the fundamentals of functional programming and how it is supported by modern C++. The second module explains how to efficiently implement C++ features such as pure functions and immutable states to build robust applications. The last module describes how to achieve concurrency and apply design patterns to enhance your application’s performance. Here, you will also learn to optimize code using metaprogramming in a functional way.

The book is divided into three modules—the first introduces the fundamentals of functional programming and how it is supported by modern C++. The second module explains how to efficiently implement C++ features such as pure functions and immutable states to build robust applications. The last module describes how to achieve concurrency and apply design patterns to enhance your application’s performance. Here, you will also learn to optimize code using metaprogramming in a functional way. The book is divided into three modules—the first introduces the fundamentals of functional programming and how it is supported by modern C++. The second module explains how to efficiently implement C++ features such as pure functions and immutable states to build robust applications. The last module describes how to achieve concurrency and apply design patterns to enhance your application’s performance. Here, you will also learn to optimize code using metaprogramming in a functional way.

By the end of the book, you will be familiar with the functional approach of programming and will be able to use these techniques on a daily basis.

Table of Contents

Chapter 1: Diving into Modern C++
Getting closer with several new features in modern C++
Leveraging the use of C++ language with the C++ Standard Libraries
Simplifying the function notation using a Lambda expression
Avoiding manual memory management with smart pointers
Storing many different data types using tuples
Summary
Chapter 2: Manipulating Functions in Functional Programming
Applying the first-class function in all functions
Getting acquainted with three functional techniques in the higher-order function
Avoiding the side effect with pure function
Reducing a multiple arguments function with currying
Summary
Chapter 3: Applying Immutable State to the Function
Understanding the essential part from immutable object
Preventing the modification of a value
Applying the first-class function and the pure function to the immutable object
Developing the immutable object
Enumerating the benefits of being immutable
Summary
Chapter 4: Repeating Method Invocation Using Recursive Algorithm
Repeating the function invocation recursively
Recurring the immutable function
Getting closer to tail recursion
Getting acquainted with functional, procedural, and backtracking recursion
Summary
Chapter 5: Procrastinating the Execution Process Using Lazy Evaluation
Evaluating the expression
The basic concept of lazy evaluation
Lazy evaluation in action
Summary
Chapter 6: Optimizing Code with Metaprogramming
Introduction to metaprogramming
Building the template metaprogramming
Selecting a type in compile-time
Flow control with template metaprogramming
Executing the code in compile-time
Benefits and drawbacks of metaprogramming
Summary
Chapter 7: Running Parallel Execution Using Concurrency
Concurrency in C++
Synchronizing the threads using mutex
Understanding the thread processing in a Windows operating system
Summary
Chapter 8: Creating and Debugging Application in Functional Approach
Preparing an imperative class
Refactoring the imperative class to become a functional class
Debugging the code
Summary

What You Will Learn

  • Get to know the difference between imperative and functional approaches
  • See the use of first-class functions and pure functions in a functional style
  • Discover various techniques to apply immutable state to avoid side effects
  • Design a recursive algorithm effectively
  • Create faster programs using lazy evaluation
  • Structure code using design patterns to make the design process easier
  • Use concurrency techniques to develop responsive software
  • Learn how to use the C++ Standard Template Library and metaprogramming in a functional way to improve code optimization

Authors

Table of Contents

Chapter 1: Diving into Modern C++
Getting closer with several new features in modern C++
Leveraging the use of C++ language with the C++ Standard Libraries
Simplifying the function notation using a Lambda expression
Avoiding manual memory management with smart pointers
Storing many different data types using tuples
Summary
Chapter 2: Manipulating Functions in Functional Programming
Applying the first-class function in all functions
Getting acquainted with three functional techniques in the higher-order function
Avoiding the side effect with pure function
Reducing a multiple arguments function with currying
Summary
Chapter 3: Applying Immutable State to the Function
Understanding the essential part from immutable object
Preventing the modification of a value
Applying the first-class function and the pure function to the immutable object
Developing the immutable object
Enumerating the benefits of being immutable
Summary
Chapter 4: Repeating Method Invocation Using Recursive Algorithm
Repeating the function invocation recursively
Recurring the immutable function
Getting closer to tail recursion
Getting acquainted with functional, procedural, and backtracking recursion
Summary
Chapter 5: Procrastinating the Execution Process Using Lazy Evaluation
Evaluating the expression
The basic concept of lazy evaluation
Lazy evaluation in action
Summary
Chapter 6: Optimizing Code with Metaprogramming
Introduction to metaprogramming
Building the template metaprogramming
Selecting a type in compile-time
Flow control with template metaprogramming
Executing the code in compile-time
Benefits and drawbacks of metaprogramming
Summary
Chapter 7: Running Parallel Execution Using Concurrency
Concurrency in C++
Synchronizing the threads using mutex
Understanding the thread processing in a Windows operating system
Summary
Chapter 8: Creating and Debugging Application in Functional Approach
Preparing an imperative class
Refactoring the imperative class to become a functional class
Debugging the code
Summary

Book Details

ISBN 139781787281974
Paperback304 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

TensorFlow Machine Learning Cookbook Book Cover
TensorFlow Machine Learning Cookbook
$ 43.99
$ 30.80
DevOps with Windows Server 2016 Book Cover
DevOps with Windows Server 2016
$ 47.99
$ 33.60
Programming Kotlin Book Cover
Programming Kotlin
$ 35.99
$ 25.20
React: Building Modern Web Applications Book Cover
React: Building Modern Web Applications
$ 59.99
$ 42.00
Fast Data Processing with Spark 2 - Third Edition Book Cover
Fast Data Processing with Spark 2 - Third Edition
$ 31.99
$ 22.40
Data Visualization with D3 4.x Cookbook - Second Edition Book Cover
Data Visualization with D3 4.x Cookbook - Second Edition
$ 35.99
$ 25.20