Personal project

Typhon

Active development
On this page

Typhon project wordmark

The problem

Python’s runtime flexibility is useful, but it also leaves type and control-flow mistakes until execution. I’m exploring how much can be made explicit while keeping readable Python as the output.

What I’m building

Typhon is a statically typed Python dialect. Its Rust toolchain includes the compiler, type checker, language server, formatter and REPL. The compiler emits Python that can be inspected and used with the existing ecosystem.

Typhon architecture: strict source and types pass through a compiler pipeline to readable Python

Design decisions

Result types, nullable values and exhaustive unions make failure and branching explicit. Compiler diagnostics and editor feedback are part of the language, rather than additions after syntax design.

A small source example illustrates the intent:

def double(value: int) -> int:
    return value * 2

The important boundary is between checked source and ordinary Python output. The repository documents the supported syntax and the compiler’s current behaviour.

Evidence and status

The public repository includes the Rust compiler, examples, tests and documentation site. This is an evolving language project; syntax and supported features should be checked against that version’s documentation.