Blog post on deterministic core architecture gains attention
An article refining functional programming patterns for legacy code circulates across tech communities.
What to know
- The post refines a 14-year-old architecture pattern to emphasize determinism (consistent input-output behavior) rather than pure functional programming as the key testability property.
- Determinism can be achieved through imperative patterns like state machines, making the approach more practical for legacy systems and performance-constrained environments like C.
- The article proposes separating deterministic business logic from non-deterministic I/O and side effects, mirroring but broadening the functional core/imperative shell distinction.
Author (outdata.net) Blog authorGary Bernhardt Software architecture theorist
How it unfolded 2 developments, newest first · click a bar or a number to jump articlesposts
-
2
Article shared on Mastodon
The post is shared across Mastodon, with links to both the original article and the Hacker News discussion thread.
-
I don't buy it - the problem with the state machine version is that, while it might be deterministic, when you are looking at a bit of code you can only assume it is deterministic if you know that no one else (by which I mean no other thread or just some other place in the program) has access to the state machine object. While its only literally…
-
-
1
Article reaches Hacker News frontpage
The post gains traction on Hacker News with 3 points and 1 comment, appearing on the HN frontpage RSS feed.
“Fourteen years ago, Gary Bernhardt coined the term Functional Core, Imperative Shell. Like most good ideas in computing it was not entirely new, but his conception had great clarity, and it forms an excellent basis for talking about testing and determinism in existing systems.”
— Author, Blog author · source -
Also known as sans-io; also, the async "function color" is itself essentially an indicator of non-determinism (well, maybe except for cooperative multitasking)
-
-
background
Blog post on deterministic core architecture published — An article on outdata.net introduces "Deterministic Core, Non-Deterministic Shell" as an architectural pattern, building on Gary Bernhardt's 14-year-old "Functional Core, Imperative Shell" concept. The post argues that determinism—consistent outputs for given inputs—is the property that makes code testable, and that this can be achieved through imperative patterns like state machines, not just pure functional programming.