The Evolution of a Scala Programmer

Alexey Avramenko
Jun 2 · 3 min read

17 different ways to calculate a factorial.

Disclaimer: this article is a parody inspired by the Haskell version, please don’t take it too seriously. However, I believe that some examples actually have some value and can be used as a reference.



Beginner Scala programmer

Coming from Java likes the fact that semicolons are optional. And return. And type declarations.


Beginner functional Scala programmer

Forced by his teammates to use this weird IO thing. Can’t get approval for his small PR for weeks. Unsure if it was worth quitting his high paying Java position.


Scala programmer circa 2011

Traits and mixins! Believes in OOP and SOLID, likes cakes.


Free monadic Scala programmer

Has a list of his favorite puns around the word Free, like “reasonably priced monads” or “Free is not for free”. Read all of Bartosz Milewski’s category theory installments. Favorite phrase: “X? But it’s just a Y in the category of Z!”


Freak monad Scala programmer

Tired of lifting and composing multiple algebras with coproducts, throws some type level magic in there. Spends all that free time (FreeK time?) on figuring out type checker’s cryptic error messages.


Tagless Final Scala programmer

Has (monad) commitment issues. While texting all the words starting with f are autocorrected to F[_]. Thinks about switching to Haskell someday.


John A De Goes

Type-safe, composable, asynchronous, concurrent, high performance, resource-safe, testable, functional and resilient factorial.


Fabio Labella


Akka Scala programmer

Hates type checker as it slows down development. Has a huge short term memory capacity to keep track of all those messages.


Spark Scala programmer

Strongly believes that cannons are perfectly fine for killing flies. Doesn’t mess around.


Java Scala programmer

Occasionally sneaks in Java class into a Scala project.


Trampolined Scala programmer

Had a mental breakdown after that StackOverflowError happened in production on Friday evening. Hasn’t recovered to this day.


Peano ADT Scala programmer

Had a bright future but started hanging out with some bad Idris kids. Stopped caring about effects composition or stack safety.


Type level Scala programmer

Spends nights staring at those red squiggly lines, experiences genuine excitement when they disappear. Suffers from massive migraines and bad sleep quality. Favorite nonfiction — the HoTT book.


Shapeless Scala programmer

Wears a beard and round glasses.


Fix Scala programmer

Has a Y-combinator tattoo on his arm. Can stare at romanesco broccoli for hours.


Paramorphism Scala programmer

Actually a Haskell programmer in disguise. Uses vim with an empty .vimrc. Likes to draw commutative diagrams while listening to odd time signature progressive metal.


Apo-futu-hylomorphism Scala programmer

Has lots of hair. Wrote this on a napkin in a bar while having some beer with Bartosz Milewski and Edward Kmett.


Alexey Avramenko

Written by

Into Scala, Haskell and functional programming