Metaprogramming Elixir: Write Less Code, Get More Done (and Have Fun!) (Paperback)
暫譯: 元編程 Elixir:寫更少的程式碼,完成更多的工作(並享受樂趣!)(平裝本)

Chris McCord

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2015-03-10
  • 定價: $595
  • 售價: 8.8$524
  • 語言: 英文
  • 頁數: 128
  • 裝訂: Paperback
  • ISBN: 1680500414
  • ISBN-13: 9781680500417
  • 相關分類: Functional-programming
  • 立即出貨 (庫存=1)

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

相關主題

商品描述

Write code that writes code with Elixir macros. Macros make metaprogramming possible and define the language itself. In this book, you'll learn how to use macros to extend the language with fast, maintainable code and share functionality in ways you never thought possible. You'll discover how to extend Elixir with your own first-class features, optimize performance, and create domain-specific languages.

Metaprogramming is one of Elixir's greatest features. Maybe you've played with the basics or written a few macros. Now you want to take it to the next level. This book is a guided series of metaprogramming tutorials that take you step by step to metaprogramming mastery. You'll extend Elixir with powerful features and write faster, more maintainable programs in ways unmatched by other languages.

You'll start with the basics of Elixir's metaprogramming system and find out how macros interact with Elixir's abstract format. Then you'll extend Elixir with your own first-class features, write a testing framework, and discover how Elixir treats source code as building blocks, rather than rote lines of instructions. You'll continue your journey by using advanced code generation to create essential libraries in strikingly few lines of code. Finally, you'll create domain-specific languages and learn when and where to apply your skills effectively.

When you're done, you will have mastered metaprogramming, gained insights into Elixir's internals, and have the confidence to leverage macros to their full potential in your own projects.

商品描述(中文翻譯)

撰寫使用 Elixir 巨集的程式碼來生成程式碼。巨集使得元程式設計成為可能,並定義了語言本身。在這本書中,您將學習如何使用巨集來擴展語言,編寫快速且可維護的程式碼,並以您從未想過的方式共享功能。您將發現如何使用自己的第一級特性來擴展 Elixir,優化性能,並創建特定領域的語言。

元程式設計是 Elixir 最偉大的特性之一。也許您已經玩過基本概念或編寫過幾個巨集。現在,您想將其提升到更高的層次。這本書是一系列引導式的元程式設計教程,將一步步帶您掌握元程式設計。您將使用強大的特性擴展 Elixir,並以其他語言無法比擬的方式編寫更快、更可維護的程式。

您將從 Elixir 的元程式設計系統的基本概念開始,了解巨集如何與 Elixir 的抽象格式互動。接著,您將使用自己的第一級特性擴展 Elixir,編寫測試框架,並發現 Elixir 如何將源代碼視為構建塊,而不是死板的指令行。您將繼續使用高級代碼生成來創建必要的庫,並以驚人的少量代碼行完成。最後,您將創建特定領域的語言,並學習何時以及如何有效地應用您的技能。

完成後,您將掌握元程式設計,深入了解 Elixir 的內部運作,並有信心在自己的專案中充分利用巨集的潛力。