The founding document of Five, written as a manifesto: - Why 30 years of xBase code must not be discarded - Why Go is the right foundation for the next 50 years - Why human-readable code matters more in the AI era - What was designed: 5 principles, 5 architectures - The vision: living code that bridges past and future "Code fades, but thought endures." Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7.4 KiB
Five — Code Fades, but Thought Endures
"Good code is not what machines execute, but what humans read." — Charles KWON OhJun
Prologue: The Weight of 30 Years
In the 1990s, xBase languages — dBASE, Clipper, Harbour — were the heartbeat of millions of businesses worldwide. They calculated payroll, managed inventory, tracked customers. People's livelihoods depended on that code.
Then the world changed. Java came. .NET came. Python came. Now AI has come.
But those payroll systems are still running. Thirty-year-old PRG code still calculates someone's salary today.
Should we throw it away?
I believe we should not.
Chapter 1: Design That Preserves
Code is an Asset
The most expensive thing in software is not building something new. It's rebuilding what has already been proven.
Code that has run for 30 years contains thousands of bug fixes. Hundreds of tax regulation changes are embedded in it. Undocumented business rules live inside those IF statements.
"Modernizing" this to Python means resetting 30 years of experience to zero.
Five's First Principle: Don't change a single line of existing code.
// This code was written in 1995
USE customers NEW
SET FILTER TO balance > 10000
GO TOP
DO WHILE !Eof()
? name, balance
SKIP
ENDDO
// It runs as-is in Five, 2026.
// And now, in the same file:
IMPORT "database/sql"
db := sql.Open("postgres", connStr)
Chapter 2: Why Go
Three Questions When Choosing a Language
1. Will it still be alive in 10 years?
Go was created by Google. But that's not why it survives. Go survives because it is simple.
Generics came late to Go. Intentionally. Go has no exceptions. Intentionally. Go has no inheritance. Intentionally.
A language that rejects complexity doesn't follow trends. Just as C has survived 50 years, Go is built to survive the next 50.
2. Does it align with the future of hardware?
CPUs no longer get faster. They get more cores. Go's goroutines were designed for this future.
// Process 100,000 items across 8 cores
PARALLEL FOR i := 1 TO 100000
aResult[i] := ProcessItem(aData[i])
NEXT
Other languages require thread pools, mutexes, deadlock analysis. In Five, it's one line.
3. Is the output self-contained?
Go produces a single binary. No JVM. No Python interpreter. No Node.js runtime.
five build payroll.prg -o payroll
scp payroll server:/usr/local/bin/
# Done. Zero dependencies.
You never need to ask a customer to install Java on their server.
Chapter 3: Code in the Age of AI
AI Changed Everything, Except One Thing
In 2025, AI learned to write code. But understanding code is still a human task.
AI-generated Go:
func processCustomers(db *sql.DB, threshold float64) ([]CustomerResult, error) {
rows, err := db.QueryContext(ctx, `SELECT c.id, c.name,
COALESCE(SUM(o.amount), 0) as total FROM customers c
LEFT JOIN orders o ON c.id = o.customer_id
GROUP BY c.id, c.name HAVING COALESCE(SUM(o.amount), 0) > $1`, threshold)
if err != nil {
return nil, fmt.Errorf("query customers: %w", err)
}
defer rows.Close()
var results []CustomerResult
for rows.Next() {
var r CustomerResult
if err := rows.Scan(&r.ID, &r.Name, &r.Total); err != nil {
return nil, fmt.Errorf("scan: %w", err)
}
results = append(results, r)
}
return results, rows.Err()
}
AI-generated Five:
FUNCTION ProcessCustomers(nThreshold)
LOCAL aResult, i
aResult := {}
USE customers NEW
GO TOP
DO WHILE !Eof()
IF customer->total > nThreshold
AAdd(aResult, {customer->id, customer->name, customer->total})
ENDIF
SKIP
ENDDO
RETURN aResult
Both do the same thing. But only one allows a sales manager to ask: "Is nThreshold supposed to be ten thousand?"
The Greatest Danger of AI-Generated Code
The biggest risk of AI code is not that it doesn't work. It's that it works but is wrong.
- A 0.01% error in tax calculation
- A condition that allows negative inventory
- Date comparison logic that ignores time zones
These bugs pass tests. These bugs survive code reviews. These bugs are found only by someone who can read the code.
Five's Second Principle: Code must be readable by humans.
Chapter 4: Building the Bridge
Not a Transpiler — A Fusion Language
Five is not "a tool that converts Harbour to Go." Five is a language that unifies two worlds.
TypeScript added types to JavaScript. Kotlin removed Java's pain points. Five places Go's future on top of xBase's 30-year legacy.
// The past (xBase)
USE customers NEW
SEEK "CHARLES"
// The present (Five)
IMPORT "net/http"
http.ListenAndServe(":8080", handler)
// The future (Five)
PARALLEL FOR i := 1 TO RecCount()
aResult[i] := ASYNC AnalyzeCustomer(i)
NEXT
aFinal := AWAIT AllResults(aResult)
Past, present, and future coexist in a single .prg file.
The Philosophy of IMPORT
IMPORT "database/sql"
What this single line means:
- Access to 500,000+ Go packages
- No
#pragma BEGINDUMP, no wrappers, no FFI - In PRG syntax, by PRG developers, the PRG way
What other languages call "external library integration," Five calls "just IMPORT."
Chapter 5: What Was Designed
1. Survival of 30-Year Code
232/236 (98%) Harbour compatibility. Existing PRG code runs without modification. DBF, NTX, CDX index engines reimplemented in Go. 351 Harbour RTL functions ported.
Design philosophy: Compatibility is non-negotiable.
2. Complete Access to Go's Ecosystem
One IMPORT line for any Go package. pkg.Func() — call Go functions in PRG syntax. obj:Method() — manipulate Go objects Harbour-style. FastPath optimization — within 2x of native Go performance.
Design philosophy: The boundary must be invisible.
3. Democratization of Concurrency
goroutine, channel, select in PRG syntax. SPAWN, <-, WATCH — usable by developers who don't know Go. PARALLEL FOR — parallel processing in a single line.
Design philosophy: Powerful things need not be difficult.
4. Enforced Code Safety
Analyzer auto-detects undeclared and unused variables. DEFER prevents resource leaks. VM Shutdown automatically closes open databases.
Design philosophy: Code that's hard to get wrong is good code.
5. Coexistence with AI
PRG code is human-readable. Even when AI generates it, non-developers can verify it. Hungarian notation makes variable types visible in names.
Design philosophy: Even when AI creates, humans must own.
Chapter 6: Toward the Future
The World Five Envisions
A payroll system written in 1995 serves as a REST API in 2026. From the same codebase. Without changing a single line. And 10x faster with goroutines.
This is not code that's "just maintained" like COBOL at a bank. This is living code. New features are added. It deploys to new infrastructure. New developers can read and understand it.
Technology is a Tool, and Tools Exist for People
Five does not pursue technical superiority. Five pursues the right of people to own their code.
When AI services go down, when frameworks release breaking changes, when cloud providers raise their prices —
Your code must remain yours. Single binary. Zero dependencies. Human-readable.
That is Five.
"We cannot predict the future. But we can write code that the future can still read."
— Five, 2026