Day 2: Controlling Mutations

In Day 1, you learned about the hardened skeleton—the language features that make such an excellent general purpose language—and that the syntax, filled with sugar to simplify recurring idioms, is opinionated and rich. Even if Elixir were just a general-purpose language with no bells and whistles, it would be attractive.

Today, you’re going to learn to grow your own mutations, without radiation exposure. We’ll roll our own mini-language, building a state machine with Lisp-style macros. Before we do that, we’re going to have to lay a little more foundation. We’ll work with Mix to manage our application build process, and we’ll learn to use structs. Then, we’ll dive head first into macros.

Mix

The first examples in ...

Get Seven More Languages in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.