July 2023 · 6 min read

Early Pipeline Sketches

Before Lateralus had a name, it was a notebook full of syntax sketches. Here's what the pipeline operator looked like in its earliest forms.

Attempt #1: Arrow syntax

// July 2023 - first sketch
data -> filter(x > 10) -> map(x * 2) -> sum()

The arrow felt natural but conflicts with function return types in every C-family language. Rejected.

Attempt #2: Double colon

data :: filter(x > 10) :: map(x * 2) :: sum()

Looks clean but conflicts with module/namespace resolution. Rejected.

Attempt #3: Pipe arrow (the winner)

data |> filter(x > 10) |> map(x * 2) |> sum()

Borrowed from F#, Elixir, and the TC39 proposal. Two characters, visually distinct, no conflicts. This is the one.

The naming

"Lateralus" came from the Tool album. The Fibonacci spiral theme felt right for a language about forward flow. Plus, no one had taken the name on npm, PyPI, or GitHub.

What I'd change

Nothing about |>. It's the right choice. But I wish I'd started with a type system from day one instead of adding it six months in. Retrofitting types onto an untyped language is painful.

The argument position debate

Once we settled on |>, the next question was: where does the piped value go? This decision shaped the entire standard library.

// Option A: Explicit placeholder (like Clojure's thread macros)
data |> filter(%, x > 10) |> map(%, x * 2)

// Option B: Always first argument (like F#/Elixir)
data |> filter(x > 10) |> map(x * 2)

// Option C: Curried functions (like Haskell)
data |> filter (x > 10) |> map (x * 2)

We chose Option B. The piped value always becomes the first argument. This is less flexible than a placeholder but far more readable. It also means every standard library function must take its primary data as argument one — a constraint that turned out to be a design advantage, forcing consistent API shapes.

Syntax experiments that failed

Not every idea survived contact with real code. Here are some that didn't make it:

Influence map

Every language is a remix. Here's what we deliberately borrowed and from where:

The goal was never originality. It was finding the right combination of proven ideas that work together when pipelines are the central organizing principle.

From notebook to language

The first three months were all on paper. Literal paper — a Moleskine notebook that's now held together with tape. The progression was:

The notebook still exists. Someday I'll scan it and put it in the papers section as a historical artifact.

Lateralus is built by bad-antics. Follow development on GitHub or try the playground.