About | RSS

Stung Eye

The eye of the bee holder.

Types as Concretions

I love that space where coding and philosophy collide.

Rich Hickey talked about types, such as Java classes and Haskell ADTs, as concretions, not abstractions.

People often talk about a Person class representing a person. But it doesn’t. It represents information about a person.

A Person type, with certain fields of given types, is a concrete choice about what information you want to keep out of all of the possible choices of what information to track about a person.

An abstraction would ignore the particulars and let you store any information about a person.

Eric Normand, Clojure vs. The Static Typing World

From the same piece, how Clojure was designed to make a certain kind of software easier to write.

A type of software characterized as:

solving a real-world problem
=> must use non-elegant models

running all the time
=> must deal with state and time

interacting with the world
=> must have effects and be affected

everything is changing
=> must change in ways you can’t predict