Doctrine / Introduction

Nullify

Nullify is not a library. It is a philosophy: that the most correct function ever written is the one that declares itself and then, with great discipline, does nothing.

Every bug ever shipped lived inside code that ran. Nullify observes the obvious corollary and writes code that doesn't. What is not written cannot fail. What does not run cannot be slow. The empty function never fails at its task. It can, admittedly, disappoint those who expected it to have one, but Nullify holds that the fault lies with the expectation, not the function.

Purists will note that the module body also runs, and they are correct. Nullify extends to meet them: the enlightened module declares its empty functions and then, itself, does nothing further. Even a top-level statement is a temptation. Resist it.

"Perfection is achieved not when there is nothing left to add, but when there is nothing left to execute."
Note: Nullify has no installation step, no dependencies, and no repository. You already have everything you need. You have had it the whole time.

The canonical form

The doctrine is portable. Below is the empty function, faithfully expressed in ten languages. Note how each community, in its own dialect, arrives at the same enlightened silence.

Python
def nullify():
    pass
JavaScript
function nullify() {}
Rust
fn nullify() {}
Go
func nullify() {}
C
void nullify(void) {}
Java
void nullify() {}
Ruby
def nullify
end
Haskell
nullify :: IO ()
nullify = return ()
Swift
func nullify() {}
Lisp
(defun nullify () nil)
Observe: the implementations differ only in ceremony. The behaviour is identical, verified across all ten by extensive not-testing.

Virtues

A philosophy must earn its adoption. Nullify does so on every axis that matters, and declines to compete on the ones that don't.

Easy

The entire API surface is the empty pair of braces. There is nothing to learn, misremember, or read the changelog for. Onboarding time: zero.

Safe

No memory is allocated, no input is trusted, no state is mutated. The attack surface is a smooth, featureless void. Provably free of every CVE ever filed.

Fast

An empty body compiles away entirely. Nullify runs in constant time, that constant being zero. It is the only workload the optimiser truly respects.

Portable

Runs identically on every architecture, past and future. Forward-compatible with hardware not yet invented. Never needs a polyfill.

Testable

100% branch coverage is reached with a single empty test asserting nothing. The CI pipeline is always green, because it has nothing to catch.

Sustainable

Zero CPU cycles means zero watts. Nullify is the only carbon-negative function, if you count the flights you didn't take to the incident review.

Benchmarks

Measured against leading alternatives that insist on doing something:

MetricTypical functionNullify
Latency (p99)14.2 ms0 ms
Memory38 MB0 B
Open bugs70
Lines to review1,2040
Regretconsiderablenone

FAQ

Does adopting Nullify require rewriting my code?
Ideally, deleting it.

What does this domain actually host?
A philosophy. Philosophies are famously light on infrastructure, which is why the page is so short.

© whenever · Nullify · No rights reserved, because nothing was created.