A blog on software engineering by Trevor Brown

The Problem With Elixir’s with

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.

Reducing Eye Strain

Over the last couple years I’ve experienced some symptoms of eye strain after a long day at the computer. I spend most of my day in front of the computer and I want my setup to be as healthy for my eyes as possible. I began reading what I could find on the topic. I wrote this post to document the things I learned and the changes I made as a result.

Function/Variable Ambiguity in Elixir

Variable syntax is one of the big differences between Erlang and Elixir that I encountered when learning Elixir. Instead of having to start each variable name with an uppercase letter, a lowercase letter must be used. This change in syntax seems like an improvement - after all most mainstream programming languages require variables to start with a lowercase letter, and lowercase is generally easier to type. However, a deeper look at this syntax choice reveals some significant downsides that I want to present here.