AstonJ
Metaprogramming Elixir (Pragprog)
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ ![]()
Most Liked
chrismccord
The book is still 100% relevant and there’s not yet a need for a 2nd edition as Elixir’s AST and metaprogramming features are fortunately quite stable. I think the only thing that needs updated in the book today is the break feature of the while macro will warn on null arity parens ![]()
frigidcode
Ted
I picked up Metaprogramming Elixir during PragProg’s recent Christmas in July sale; the book is already modestly priced but was a steal with the discount.
I’m fairly new to Elixir, so my original intent was to read the book once I had a bit more exposure and experience under my belt.
But then I thought, “Well, I already have a rudimentary familiarity with macros from dabbling in Clojure (a lisp). I’ll be learning Ecto and Phoenix soon and I know there are some DSLs and use going on there, so it’d be really nice to have some intuition about what’s happening under the hood. Let’s just take a little peek at the first chapter and see.”
I was hooked.
Chris McCord’s clear writing style and obvious focus on reader ergonomics, e.g., repeating relevant bits of code, makes the book very readable and engaging.
Regarding content, there were plenty of moments where I thought, “wait, we’re going to do what next?! Okay, I’ve got time to read a few more pages…”
And, as I had hoped, the book covers DSLs and use, but it also covered so much more.
I was introduced to Elixir’s AST and the concept of macro hygiene, along with repeatable recipes for building DSLs and testing macros.
As an Elixir noob, I don’t think I’ll be writing my own for-real macros just yet, but I feel that I’ve gain a lot of valuable intuition about how the language works, which was my goal.
This is definitely a resource I’ll revisit once I get more experience.
Thank you @chrismccord!
Other notes:
I read the book cover-to-cover in about three days, mostly during lunch breaks and at bedtime.
I recommend reading the book start-to-finish.
I found the book to be e-reader friendly (Kindle Paperwhite, landscape).
Popular in Books
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex










