Mastering Ruby Closures: A Guide to Blocks, Procs, and Lambdas
暫譯: 精通 Ruby 閉包:區塊、Proc 與 Lambda 的指南
Benjamin Tan Wei Hao
- 出版商: Pragmatic Bookshelf
- 出版日期: 2017-08-26
- 售價: $900
- 貴賓價: 9.5 折 $855
- 語言: 英文
- 頁數: 96
- 裝訂: Paperback
- ISBN: 1680502611
- ISBN-13: 9781680502619
-
相關分類:
Ruby
立即出貨(限量) (庫存=4)
買這商品的人也買了...
-
FXRuby: Create Lean and Mean GUIs with Ruby$1,220$1,159 -
$990Programming Ruby: The Pragmatic Programmers' Guide, 3/e (Paperback) -
作業系統原理 (Operating System Concepts, 8/e)$850$808 -
jQuery UI in Action (Paperback)$1,485$1,411 -
$356SaaS軟件工程(雲計算時代的敏捷開發) -
Learn Game Programming with Ruby: Bring Your Ideas to Life with Gosu (Paperback)$1,010$960 -
$390Web應變之道 -
Workflow Patterns: The Definitive Guide (Hardcover)$1,575$1,496 -
社群分享經濟的力量:把分享打造成新型態的購買,推特、臉書、Linkedin、Instagram、Youtube的人本分享術 (Shareology:How Sharing is Powering the Human Economy)$299$254 -
Streaming Data: Understanding the real-time pipeline$1,650$1,568 -
Clean Architecture: A Craftsman's Guide to Software Structure and Design (Paperback)$1,850$1,813 -
RESTful Web Clients 技術手冊 (RESTful Web Clients: Enabling Reuse Through Hypermedia)$580$458 -
深入淺出 Agile (Head First Agile: A Brain-Friendly Guide to Agile and the PMI-ACP Certification)$780$616 -
深入學習 JavaScript 模組化設計 (Mastering Modular JavaScript)$400$316 -
Working Effectively with Legacy Code : 管理、修改、重構遺留程式碼的藝術 (中文版)$720$562 -
$401松本行弘 編程語言的設計與實現 -
$477Rust 權威指南 (The Rust Programming Language (Covers Rust 2018)) -
再強一點:用 Go語言完成六個大型專案$780$616 -
$1,400Network Programming with Go: Learn to Code Secure and Reliable Network Services from Scratch -
設計重構:25個管理技術債的技巧消除軟體設計臭味 (Refactoring for Software Design Smells: Managing Technical Debt)$520$406 -
黑帽 Python|給駭客與滲透測試者的 Python 開發指南, 2/e (Black Hat Python : Python Programming for Hackers and Pentesters, 2/e)$450$356 -
Spring REST API 開發與測試指南|使用 Swagger、HATEOAS、JUnit、Mockito、PowerMock、Spring Test$580$493 -
Linux 網路內功修煉 - 徹底了解底層原理及高性能架構$780$663 -
演算法生存指南(書況差限門市銷售)$800$632 -
Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications (Paperback)$1,950$1,853
商品描述
The road to Ruby mastery is paved with blocks, procs, and lambdas. To be a truly effective Ruby programmer, it's not enough just to understand these features - you need to know how to use them in practice. Discover how to write code that is elegant, expressive, and a joy to use, and gain a deep understanding of these concepts so you can work with third-party gems and libraries more easily. Whether you are completely new to Ruby or a seasoned Rubyist, you'll find good use for these concepts in your code.
Ruby developers use the Ruby language as the yardstick for expressivity, flexibility, and elegance - and a large part of this is due to blocks, lambdas, and procs. These language features make Ruby one of the most beautiful and pleasant languages to work with. Learn how to understand and craft code that will take you closer to Ruby mastery.
Start with the basics of closures and then dive into blocks, as you learn about the patterns that involve blocks, and how they are used in real-world code. Then create and use procs and lambdas. Finally, build your own lazy enumerables with advanced Ruby features such as fibers and generators. Along the way, work with computer science concepts such as closures, free variables and first-class functions. Spot a closure easily. Identify the patterns where you can effectively use blocks and re-implement common standard library methods using them. Trace through how Symbol#to_proc works and find out the different ways of calling procs. This succinct guide takes you through the different kinds of Ruby closures with engaging examples, and each chapter comes with exercises that test and challenge your understanding.
When you finish this book, blocks, procs, and lambdas will have become an integral part of your Ruby toolbox.
What You Need:Ruby 2.x and a basic familiarity with Ruby.
商品描述(中文翻譯)
道路通往 Ruby 精通的旅程充滿了 blocks、procs 和 lambdas。要成為一名真正有效的 Ruby 程式設計師,僅僅理解這些特性是不夠的——你需要知道如何在實踐中使用它們。發現如何編寫優雅、表達力強且令人愉悅的程式碼,深入理解這些概念,以便更輕鬆地使用第三方 gems 和庫。無論你是完全新手還是資深的 Ruby 使用者,你都會在程式碼中找到這些概念的良好應用。
Ruby 開發者將 Ruby 語言視為表達力、靈活性和優雅的標準——而這在很大程度上歸功於 blocks、lambdas 和 procs。這些語言特性使 Ruby 成為最美麗和愉快的語言之一。學習如何理解和編寫程式碼,讓你更接近 Ruby 的精通。
從閉包的基本概念開始,然後深入了解 blocks,學習涉及 blocks 的模式,以及它們在實際程式碼中的使用方式。接著創建和使用 procs 和 lambdas。最後,使用進階的 Ruby 特性如 fibers 和 generators,構建自己的懶惰可列舉物件。在這個過程中,與計算機科學概念如 閉包 (closures)、自由變數 (free variables) 和 一級函數 (first-class functions) 進行互動。輕鬆識別閉包。找出可以有效使用 blocks 的模式,並使用它們重新實現常見的標準庫方法。追蹤 Symbol#to_proc 的運作方式,了解調用 procs 的不同方法。這本簡明的指南通過引人入勝的範例帶你了解不同類型的 Ruby 閉包,每一章都附有測試和挑戰你理解的練習。
當你完成這本書時,blocks、procs 和 lambdas 將成為你 Ruby 工具箱中不可或缺的一部分。
你需要的: Ruby 2.x 和對 Ruby 的基本熟悉。
