Tutorial

Boilerplate Busting in Functional Languages

1 May 2024
Tutorial

This is the story of how I solved a problem (ugly, cumbersome boilerplate code) that I ran into while writing a program in a functional language (Elixir). Functional programming languages often pride themselves on expressiveness and elegance; but occasionally they are not amenable to the most obvious solutions to the problems we wish to solve. In this case, the simplest solution to my problem would have been to have a global mutable variable. ...

Boilerplate Busting in Functional Languages

1 May 2024
Tutorial

Nobody likes boilerplate code,1 yet we often say more than necessary in our programs. Sometimes this is good because we haven’t figured out the right abstractions yet, and two things that might look similar might not be similar when all the details come out and the two concepts grow apart. Other times, however, we program more than we need to because we haven’t found the right abstraction or way of looking at the problem. ...

Mastodon