Becoming Functional (Paperback)

Joshua Backfield

  • 出版商: O'Reilly
  • 出版日期: 2014-08-19
  • 定價: $990
  • 售價: 8.0$792
  • 語言: 英文
  • 頁數: 152
  • 裝訂: Paperback
  • ISBN: 1449368174
  • ISBN-13: 9781449368173
  • 相關分類: C++ 程式語言Command Line
  • 立即出貨 (庫存 < 4)

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

相關主題

商品描述

If you have an imperative (and probably object-oriented) programming background, this hands-on book will guide you through the alien world of functional programming. Author Joshua Backfield begins slowly by showing you how to apply the most useful implementation concepts before taking you further into functional-style concepts and practices.

In each chapter, you’ll learn a functional concept and then use it to refactor the fictional XXY company’s imperative-style legacy code, writing and testing the functional code yourself. As you progress through the book, you’ll migrate from Java 7 to Groovy and finally to Scala as the need for better functional language support gradually increases.

  • Learn why today’s finely tuned applications work better with functional code
  • Transform imperative-style patterns into functional code, following basic steps
  • Get up to speed with Groovy and Scala through examples
  • Understand how first-class functions are passed and returned from other functions
  • Convert existing methods into pure functions, and loops into recursive methods
  • Change mutable variables into immutable variables
  • Get hands-on experience with statements and nonstrict evaluations
  • Use functional programming alongside object-oriented design

商品描述(中文翻譯)

如果您具有命令式(可能是面向對象)編程背景,這本實踐指南將引導您進入函數式編程的陌生世界。作者Joshua Backfield從最有用的實現概念開始,逐步引導您進入函數式概念和實踐。

在每個章節中,您將學習一個函數式概念,然後使用它來重構虛構的XXY公司的命令式風格遺留代碼,並自己編寫和測試函數式代碼。隨著您在書中的進展,您將從Java 7遷移到Groovy,最終遷移到Scala,以逐漸增加對更好的函數式語言支持的需求。

本書的內容包括:
- 瞭解為什麼當今的精細調整應用程序與函數式代碼更配合
- 將命令式風格模式轉換為函數式代碼,按照基本步驟進行
- 通過示例快速掌握Groovy和Scala
- 理解如何將一級函數傳遞給其他函數並從其他函數返回
- 將現有方法轉換為純函數,將循環轉換為遞歸方法
- 將可變變量轉換為不可變變量
- 通過實踐和非嚴格評估獲得實踐經驗
- 在面向對象設計中使用函數式編程

這本書將幫助您從命令式編程轉向函數式編程,並提供實際的示例和練習,讓您能夠更好地應用函數式編程的概念和技巧。