Functional Programming in Go: Apply functional techniques in Golang to improve the testability, readability, and security of your code (Paperback)

Meeus, Dylan

  • 出版商: Packt Publishing
  • 出版日期: 2023-03-10
  • 售價: $1,520
  • 貴賓價: 9.5$1,444
  • 語言: 英文
  • 頁數: 248
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1801811164
  • ISBN-13: 9781801811163
  • 相關分類: 資訊安全
  • 立即出貨 (庫存=1)

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

商品描述

Learn how to leverage core functional programming (FP) concepts to write more maintainable and testable code in Go.

Key Features

• Learn functional programming techniques at the architectural level, and use the lessons learned to solve real-world problems.
• Get a deeper understanding of how to think functionally about code.
• Go is a multi-paradigm language, learn about the tradeoffs of FP and OOP.

Book Description

In “Functional Programming with Go”, you will learn the essential concepts of functional programming. Go is a multi-paradigm language that gives us the option to choose whichever paradigm works best for the particular problem we aim to solve. In this book, you will learn concepts central to the functional programming paradigm and how to leverage them to improve your Go codebases.

The book starts by explaining common concepts of functional programming and how to apply these to your codebase, even if you don’t fully buy into the functional mindset. The subsequent chapters of the book will build out a more comprehensive view of techniques and methods used in functional languages, such as Function Currying and Partial Application. We will develop this further into functional design patterns. Examples will be given throughout the book to show each concept “in action”.

By the end of this book, not only will you know how to apply these techniques in Go, but you will also know when to apply them.

What you will learn

• Learn how to think functionally about your code
• Learn about core FP concepts and how they apply to Go code
• Understand how FP can improve the testability of your codebase
• Learn functional design patterns
• Understand when to choose and not choose FP concepts
• Get a deeper understanding of functional programming

Who This Book Is For

If you are a Go engineer with a background in traditionally object-oriented languages such as Java or C++ and you want to broaden your knowledge of functional programming, this book is for you.

商品描述(中文翻譯)

學習如何運用核心的函數式編程(FP)概念,在Go中撰寫更易於維護和測試的程式碼。

主要特點:

- 學習在架構層面上的函數式編程技巧,並將所學應用於解決實際問題。
- 更深入地了解如何以函數式思維來思考程式碼。
- Go是一種多範式語言,了解函數式編程和物件導向編程(OOP)之間的權衡。

書籍描述:

在《Functional Programming with Go》中,您將學習函數式編程的基本概念。Go是一種多範式語言,讓我們可以選擇最適合解決特定問題的範式。在本書中,您將學習函數式編程範式的核心概念,並學習如何運用這些概念來改進Go程式碼庫。

本書首先解釋了函數式編程的常見概念,以及如何將這些概念應用於程式碼庫,即使您對函數式思維還不完全認同。接下來的章節將建立一個更全面的函數式語言技巧和方法的觀點,例如函數柯里化和部分應用。我們將進一步發展這些概念,並介紹函數式設計模式。本書將通過示例展示每個概念的實際應用。

通過閱讀本書,您不僅將學會如何在Go中應用這些技巧,還將學會何時應用它們。

您將學到的內容:

- 學習如何以函數式思維來思考程式碼。
- 學習核心函數式編程概念及其在Go程式碼中的應用。
- 了解函數式編程如何提高程式碼庫的可測試性。
- 學習函數式設計模式。
- 了解何時選擇和不選擇函數式編程概念。
- 更深入地了解函數式編程。

本書適合對象:

如果您是一位擁有傳統物件導向語言(如Java或C++)背景的Go工程師,並且希望擴展對函數式編程的知識,那麼本書適合您。

目錄大綱

1. Introducing Functional Programming
2. Treating Functions as First-Class Citizens
3. Higher -Order Functions
4. Write testable code with pure functions
5. Improve code maintainability with immutable states
6. Three must-have functions to write functional code
7. Solving problems recursively or iteratively
8. Readable function composition through fluent programming
9. Apply Functional Design Patterns to solve common problems
10. Thinking functionally to solve problems
11. FP Libraries in Go

目錄大綱(中文翻譯)

1. 介紹函數式編程
2. 將函數視為一等公民
3. 高階函數
4. 使用純函數編寫可測試的代碼
5. 使用不可變狀態提高代碼可維護性
6. 編寫函數式代碼的三個必備函數
7. 遞歸或迭代解決問題
8. 通過流暢編程實現可讀的函數組合
9. 應用函數式設計模式解決常見問題
10. 以函數式思維解決問題
11. Go中的函數式編程庫