Summary: Return values from different expressions in a with
block can only be distinguished by the shape of the data returned. This creates ambiguity in with
's else
clauses that make code harder to understand and more challenging to modify correctly.
with
has existed in Elixir since version 1.2 and is widely used. But there are downsides to this construct. In this blog post I’ll explore the problems caused by use of with
in a codebase. I’ll assume you know how with
works and have read the docs so I will skip over the basics of how it works.