Functional Programming in PHP: A Primer for Composing Software in PHP
暫譯: PHP 函數式程式設計:PHP 軟體組合入門指南
Lochemem, Michael Bruno
- 出版商: Apress
- 出版日期: 2026-06-17
- 售價: $1,960
- 貴賓價: 9.5 折 $1,862
- 語言: 英文
- 頁數: 162
- 裝訂: Quality Paper - also called trade paper
- ISBN: 9798868824678
- ISBN-13: 9798868824678
-
相關分類:
Functional-programming
海外代購書籍(需單獨結帳)
商品描述
This book is designed to help PHP programmers, whether experienced or looking to advance, transition into the world of Functional Programming (FP). It covers the key concepts and practical applications of FP in PHP, with a particular focus on function composition. By introducing ideas like immutability, referential transparency, and the role of functions in abstraction and generalization, the book aims to give readers the fundamental knowledge necessary to incorporate FP principles into their PHP projects.
The book distills the theoretical foundations of paradigmatic concepts such as functors, monads, lenses, pattern matching, and recursion, ideas congruent with the rationale of composing functions, into comprehensive segments that each offer demonstrations of how to apply them in solving problems that occur in everyday PHP development. So robustly intuitive are the demonstrations of paradigmatic concepts that they can easily be revised for deployment in more elaborate and often complex language codebases. In offering these, the book equips its readers to favor composition when designing solutions to challenging problems.
Additionally, the book dispels common misconceptions about FP, describes the paradigm's influence on the creation of commonplace programming ideas that, at a glance, might not seem related to it, and explores how it can be integrated with other programming paradigms. Emphasized throughout the book are the benefits of creating and using higher-order abstractions, which instate composable error handling, rigorous testing, and lazy flow control. The goal is to help readers develop a deeper understanding of FP, enabling them to incorporate its powerful patterns into their everyday programming practice and elevate their technical proficiency.
You Will Learn:
- The foundations of functional programming and the potency of composition. How to apply advanced patterns like partial application, currying, and transducers in PHP projects. How to speed up I/O operations with paradigmatic techniques and familiar concurrency concepts. How to use higher-order abstractions to write cleaner, more maintainable PHP code.
This Book is for:
PHP programmers looking to advance their skills and deepen their understanding of Functional Programming by learning new techniques for improving their code.
商品描述(中文翻譯)
這本書旨在幫助 PHP 程式設計師,無論是有經驗的還是希望進一步提升的,過渡到函數式編程(Functional Programming, FP)的世界。書中涵蓋了 FP 在 PHP 中的關鍵概念和實際應用,特別著重於函數組合。通過介紹不可變性(immutability)、參考透明性(referential transparency)以及函數在抽象和概括中的角色等概念,這本書旨在為讀者提供將 FP 原則融入其 PHP 專案所需的基本知識。
本書提煉了範式概念的理論基礎,如函子(functors)、單子(monads)、透鏡(lenses)、模式匹配(pattern matching)和遞歸(recursion),這些概念與函數組合的原理相符,並將其分解為全面的段落,每個段落都提供了如何在日常 PHP 開發中應用這些概念來解決問題的示範。這些範式概念的示範直觀且強大,能夠輕易地被修訂以用於更複雜的語言代碼庫中。通過這些示範,本書使讀者在設計解決方案以應對挑戰性問題時,更加傾向於使用組合。
此外,本書還澄清了有關 FP 的常見誤解,描述了該範式對於創造常見編程概念的影響,這些概念乍看之下可能與 FP 無關,並探討了如何將其與其他編程範式整合。全書強調了創建和使用高階抽象的好處,這些抽象實現了可組合的錯誤處理、嚴謹的測試和延遲流控制。目標是幫助讀者深入理解 FP,使他們能夠將其強大的模式融入日常編程實踐中,提升其技術能力。
你將學到:
- 函數式編程的基礎和組合的威力。
- 如何在 PHP 專案中應用部分應用(partial application)、柯里化(currying)和轉換器(transducers)等進階模式。
- 如何使用範式技術和熟悉的並發概念來加速 I/O 操作。
- 如何使用高階抽象來編寫更乾淨、更易於維護的 PHP 代碼。
本書適合:
希望提升技能並加深對函數式編程理解的 PHP 程式設計師,通過學習改善代碼的新技術。
作者簡介
Michael Bruno Lochemem, an alum of the United States International University - Africa and a current MG Lotus employee, is a Software Engineer and Technical Writer from Kampala, Uganda. Mr. Lochemem is a Functional Programming advocate and an avid promoter of Systems Programming and evented I/O. He is proficient in PHP, C, and JavaScript and actively maintains open source software that aligns closely with his technical interests. His portfolio of open-source contributions includes PHP libraries like bingo-functional and asyncify and language extensions like ext-mrloop, ext-trie, and ext-picohttpparser.
Michael likes to publish articles that topically align with his interests on his blog hosted on Medium. He is a fan of the Miami Dolphins and FC Bayern Munich and plays basketball when he is not sitting at his desk.
作者簡介(中文翻譯)
邁克爾·布魯諾·洛克赫門(Michael Bruno Lochemem),美國國際大學非洲校區的校友,目前是MG Lotus的員工,擔任軟體工程師和技術作家,來自烏干達的坎帕拉。洛克赫門先生是函數式程式設計的倡導者,並熱衷於系統程式設計和事件驅動的I/O。他精通PHP、C和JavaScript,並積極維護與其技術興趣密切相關的開源軟體。他的開源貢獻作品包括PHP函式庫如bingo-functional和asyncify,以及語言擴展如ext-mrloop、ext-trie和ext-picohttpparser。
邁克爾喜歡在他在Medium上托管的部落格上發表與他興趣主題相關的文章。他是邁阿密海豚隊和拜仁慕尼黑足球俱樂部的粉絲,並在不坐在辦公桌前時喜歡打籃球。