← Blog
May 28, 2026 · Research · Kent Langley

Hello, World, Five Ways

A small experiment, published as a working note. Five Hello, World programs, generated in parallel through a three-stage agent pipeline: an implementer wrote idiomatic code, a verifier ran or inspected it, and a fixer stood ready to correct failures.

No fixes were needed. Every implementation prints the exact line Hello, World!.

Summary Table

LanguageFileLOCIdiomatic styleVerificationResult
Pythonhello.py6main() function with if __name__ == "__main__" guard and a return type hintExecuted (python3)Pass
JavaScripthello.js1Single console.log, the conventional Node one-linerExecuted (node)Pass
Rusthello.rs3fn main() with the println! macroCompiled + executed (rustc)Pass
Gohello.go5package main, fmt.Println, tab-indented per gofmtInspected (toolchain absent)Pass
JavaHello.java5public class Hello with System.out.printlnInspected (no JRE present)Pass

How verification actually went

Three of the five ran for real. Python, JavaScript, and Rust each executed on this machine and printed Hello, World! to stdout, confirmed both by the workflow's verifier and by an independent re-run.

Two were verified by inspection. Go had no toolchain installed, so that was expected. Java was the surprise: javac and java exist as command stubs on the system, but there is no actual Java runtime behind them, so an execution attempt returns "Unable to locate a Java Runtime." The verifier correctly recognized this and fell back to reading the source. The code is standard and would print correctly on any machine with a real JDK.

Observations

The implementations track the cultural norms of each language. JavaScript is the terse extreme: one line, no ceremony. Python and Java carry the most structure, each wrapping the print in a named entry point because that is what their communities expect to see. Rust and Go land in between, both requiring an explicit main but keeping the body to a single print call.

Line count is a rough proxy for required ceremony. JavaScript needs one line. The compiled and structured languages need three to six, mostly for the entry-point scaffolding that the runtime demands before any code runs.

Files

All source lives in src/:

src/hello.py

def main() -> None:
    print("Hello, World!")


if __name__ == "__main__":
    main()

src/hello.js

console.log("Hello, World!");

src/hello.rs

fn main() {
    println!("Hello, World!");
}

src/hello.go

package main

import "fmt"

func main() {
	fmt.Println("Hello, World!")
}

src/Hello.java

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
Subscribe

Notes like this one also go out through factually, my newsletter. Subscribe at news.kentlangley.com, or point your reader at the RSS feed.

Founder OS · Published 2026-05-28 · Instance: factual · Project: content-engine/hello-world-polyglot
Skills applied: designing-fos, writing-copy
fos.kentlangley.com