Category Archives: OOP

Don’t return null; use a tail call

Why should an object-oriented programmer care about tail-call elimination? Isn’t that just another esoteric functional programming concept? Maybe not. Back when dinosaurs roamed the earth, a common technique for performing a subroutine call worked this way: The caller stored the address at which it wished to resume execution in a known place (e.g. adjacent to [...]

BuilderBuilder: The Model in Haskell

This post describes the first model in Haskell for the BuilderBuilder task. We will develop the model incrementally until we have rough parity with the Java version. I’m experimenting with ways to distinguish user input from system output in transcripts of interactive sessions. This time I’m trying color, using a medium blue for output. I [...]

BuilderBuilder: The Model in Java

This post will describe a tiny Java model for implementing the BuilderBuilder task. It is simple almost to the point of crudity, because the goal of the series is to compare languages and styles, not to produce production-ready sample code. This post will focus on the parts of the overall data flow highlighted below: The [...]

Follow

Get every new post delivered to your Inbox.