On "Why Elixir?"

Along the lines of documenting exports, I really love how defdelegate requires the args. That way, if you’re doing DDD, your aggregate root will contain a whole bunch of delegates that document, in code, how the entire context works (this is in a scenario where you’d have nested contexts). And it’s hard for them to get out of sync (save for a variable name) as changing the number of arguments or pattern matching will crash.

2 Likes