Sign in

Cristian Álvarez

@crbelaus.com
737 followers 128 following 64 posts

I write software (mainly #ElixirLang) and I do martial arts. Sometimes I blog at crbelaus.com

PostsRepliesMedia
Cristian Álvarez @crbelaus.com · 10/02/2025
My pull request has just been merged! If you use difftastic with #elixirlang (you should! it is amazing) you will notice that changes in ~H sigils are now properly highlighted. github.com/Wilfred/diff...
Difftastic can now properly highlight changes in Elixir ~H sigils.
1211
Cristian Álvarez @crbelaus.com · 12/12/2024
Over the last few months I've been in charge of deep data structure refactors on a big #ElixirLang application. I'll write a detailed blog post with the lessons learnt, but the most important takeaway is to rely on pattern match and guards as much as possible.
Screenshot showing a `deactivate/1` function. In one case it pattern matches on the `%User{}` struct so the compiler will warn us if we try to access non-existing fields. In the other case there is no pattern match, so the compiler doesn't know that we are working with a `%User{}` and we will have runtime errors instead of compilation warnings.
130