New take on Gary Bernhardt's 'Functional Core' model reframes it around determinism
A technical essay revisits Gary Bernhardt's decade-old 'Functional Core, Imperative Shell' architecture, arguing that the key property enabling easy testing isn't functional purity itself but determinism. The author suggests that state machines and other deterministic constructs can achieve the same testability benefits as pure functions, broadening how developers might structure isolated, predictable 'core' logic versus the messier, IO-heavy 'shell' that talks to the outside world.
GoKawiil's interpretation of the reporting above, not reported fact.
This reframing matters because many engineers assume strict functional purity is required to get reliable, easy-to-test code, which can make legacy or stateful systems seem untestable by comparison. By focusing on determinism instead, teams working in non-functional languages or with existing state-machine-based systems can still isolate business logic for robust testing without a full rewrite.
- The essay revisits Gary Bernhardt's 'Functional Core, Imperative Shell' concept from 14 years ago.
- It argues determinism, not strict functional purity, is the real driver of testability.
- State machines are proposed as an alternative path to achieving deterministic, testable core logic.
Source: outdata.net, 2026-09-21
Published there as: “Deterministic Core, Non-Deterministic Shell”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.