Get the latest tech news
Elixir Anti-Patterns
View Source Code-related anti-patterns This document outlines potential anti-patterns related to your code and particular Elixir idioms and features. Comments overuse Problem When you overuse comments or comment self-explanatory code, it can have the effect of making code less readable.
This unpredictable scenario can expose the software to unexpected behavior caused by excessive memory usage, or even by reaching the maximum number of atoms possible. This anti-pattern arises when developers write defensive or imprecise code, capable of returning incorrect values which were not planned for, instead of programming in an assertive style through pattern matching and guards. This behavior, shown below, allows clients to decide how to handle these errors and doesn't give a false impression that the code is working correctly when unexpected values are extracted:
Or read this on Hacker News