We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Metaprogramming Elixir

Formal Metadata

Title
Metaprogramming Elixir
Title of Series
Number of Parts
163
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Elixir macros give programmers the power to write code that writes code. This power eliminates boilerplate, allows Domain Specific Language abstractions, and provides the freedom to extend the language. Leveraging the fact that it can be represented by its own data structures, Elixir can interrogate its own code to peer in for analysis or to add additional functionality. Used appropriately, macros offer effective module composition and code generation techniques, while more liberal use can serve as an outlet for novel insights through experimentation. Starting from the basics of macros, we’ll explore these ideas from an introductory level through advanced topics and real-world use-cases. Along the way, we’ll see how Elixir uses meta-programming to generate parts of its own standard library. We’ll also examine how macros can be used to save time and share functionality in a fun and productive way.