Learning C++ Functional Programming

Wisnu Anggoro

  • 出版商: Packt Publishing
  • 出版日期: 2017-08-09
  • 售價: $2,180
  • 貴賓價: 9.5$2,071
  • 語言: 英文
  • 頁數: 304
  • 裝訂: Paperback
  • ISBN: 1787281973
  • ISBN-13: 9781787281974
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Key Features

  • Modularize your applications and make them highly reusable and testable
  • Get familiar with complex concepts such as metaprogramming, concurrency, and immutability
  • A highly practical guide to building functional code in C++ filled with lots of examples and real-world use cases

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.

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.

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

About the Author

Wisnu Anggoro is a Microsoft Certified Professional in C# programming and an experienced C/C++ developer. He has also authored the books Boost.Asio C++ Network Programming - Second Edition and Functional C# by Packt. He has been programming since he was in junior high school, which was about 20 years ago, and started developing computer applications using the BASIC programming language in the MS-DOS environment. He has solid experience in smart card programming, as well as desktop and web application programming, including designing, developing, and supporting the use of applications for SIM Card Operating System Porting, personalization, PC/SC communication, and other smart card applications that require the use of C# and C/C++. He is currently a senior smart card software engineer at CIPTA, an Indonesian company that specializes in innovation and technology for smart cards. He can be reached through his email at wisnu@anggoro.net.

Table of Contents

  1. Diving into Modern C++
  2. Manipulating functions in functional programming
  3. Applying immutable state to the function
  4. Recurring method invocation using recursive algorithm
  5. Procrastinating the execution process using Lazy Evaluation
  6. Optimizing code with Metaprogramming
  7. Running parallel execution using Concurrency
  8. Creating and debugging application in functional approach

商品描述(中文翻譯)

主要特點



  • 將應用程式模組化,使其高度可重用和可測試

  • 熟悉複雜的概念,如元編程、並發性和不可變性

  • 一本高度實用的 C++ 函數式編碼指南,充滿了大量的例子和實際應用案例

書籍描述


函數式編程使開發人員能夠將程序分解為更小、可重用的組件,從而簡化軟件的創建、測試和維護。結合 C++ 的強大功能,您可以開發出強大且可擴展的應用程序,滿足現代軟件的需求。本書將幫助您發現所有可以應用於以函數式方式構建軟件的 C++ 17 功能。


本書分為三個模塊,第一個模塊介紹了函數式編程的基礎知識以及現代 C++ 對其的支持。第二個模塊解釋了如何高效實現 C++ 功能,例如純函數和不可變狀態,以構建強大的應用程序。最後一個模塊描述了如何實現並發性並應用設計模式來提高應用程序的性能。在這裡,您還將學習如何以函數式方式使用元編程來優化代碼。


通過閱讀本書,您將熟悉函數式編程方法,並能夠在日常工作中應用這些技術。

你將學到什麼



  • 了解命令式和函數式方法之間的差異

  • 在函數式風格中使用一級函數和純函數

  • 發現各種技術,應用不可變狀態以避免副作用

  • 有效設計遞歸算法

  • 使用惰性求值創建更快的程序

  • 使用設計模式結構代碼,使設計過程更輕鬆

  • 使用並發技術開發響應式軟件

  • 學習如何以函數式方式使用 C++ 標準模板庫和元編程來改進代碼優化

關於作者


Wisnu Anggoro 是一位持有微軟 C# 編程認證的專業人士,也是一位有經驗的 C/C++ 開發人員。他還撰寫了 Packt 出版的《Boost.Asio C++ Network Programming - Second Edition》和《Functional C#》兩本書。他從初中開始就開始編程,大約是 20 年前的事了,並開始使用 MS-DOS 環境中的 BASIC 編程語言開發計算機應用程序。他在智能卡編程方面有豐富的經驗,以及桌面和 Web 應用程序編程方面的經驗,包括設計、開發和支持用於 SIM 卡操作系統移植、個性化、PC/SC 通信和其他需要使用 C# 和 C/C++ 的智能卡應用程序。他目前是印尼 CIPTA 公司的高級智能卡軟件工程師,該公司專注於智能卡的創新和技術。您可以通過他的電子郵件 wisnu@anggoro.net 與他聯繫。

目錄



  1. 深入現代 C++

  2. 在函數式編程中操作函數

  3. 應用不可變狀態於函數

  4. 使用遞歸算法進行方法調用

  5. 使用惰性求值延遲執行過程

  6. 使用元編程優化代碼

  7. 使用並發運行並行執行

  8. 以函數式方式創建和調試應用程序