hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_fun()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_fun()
%{user | name: "John Doe"}
Since this could be seen by new-comers to the language, offering a better user experience by avoiding abbreviations. Favoring the usage of "some_function" instead of "some_fun"