← Sun, Nov 22 digest

Unit-testing in the Ü programming language

read article ↗ hn thread ↗

The creator of the Ü programming language added built-in unit-testing using process isolation and shared memory to handle failures without exceptions or stack unwinding.

read it A detailed engineering postmortem on implementing language-level testing and crash recovery without exceptions or stack unwinding.

summary

The creator of the Ü programming language details how they added built-in unit-testing with zero setup required. Because Ü lacks exceptions and stack unwinding, handling test failures safely required experimenting with signal handlers and process isolation. The final architecture runs tests inside a supervised child process, using shared memory to track status and restart after crashes. This design automatically catches low-level issues like segmentation faults and integer division by zero alongside standard test failures.

key points

  1. Ü provides built-in test syntax and build-system integration to eliminate setup friction and third-party dependencies.
  2. Since the language omits exceptions and stack unwinding for simplicity, failures are handled via supervised child processes.
  3. A shared memory block tracks test status between parent and child processes, allowing up to 32 test restarts per run.

who should read it

Language designers and systems programmers interested in compiler tooling and test runner architecture.

Generated by an LLM from the article and thread. Check the sources before relying on it.