๐Ÿ‡จ๐Ÿ‡ฆ software engineer, runs on โ˜•

Currently in Toronto, ON

Working remotely as a Frontend Engineer for

Latest Post

A Fun Little Elixir Macro

Andrew Fontaine <andrew@afontaine.ca>

I'm working on a big refactoring of my one elixir library, unleash, and one of the changes I'm working on is moving from using behaviours and towards using protocols instead, but this means parsing a bunch of JSON objects into their appropriate structs. While Poison can already do this, I don't want to be dependant on a single JSON library (for now), and it doesn't quite tackle the problem at hand, so I got to work.

After migrating two of the eight strategies to this new format, I saw a lot of boilerplate, and got to work (learning to) writing a macro.


Read more posts