Back Original

Blaise – A modern self-hosting zero-legacy Object Pascal compiler targeting QBE

The Object Pascal ecosystem has two options: Embarcadero Delphi (proprietary, Windows-first) and Free Pascal (open source but carrying 30 years of accumulated complexity — five language modes, five string types, and thousands of include files).

This compiler takes a different approach:

  • One language mode. No {$mode} switches; no legacy dialect support.

  • One string type. UTF-8 reference-counted string. RawBytes for binary data.

  • One memory model. Automatic reference counting applies uniformly to strings, classes, and interfaces. No manual/auto split between TObject and TInterfacedObject; [Weak] breaks cycles. Free is retained as a synonym for immediate release.

  • Clean interfaces. No COM GUIDs; interface dispatch via compile-time vtable mapping.

  • Reified generics. Monomorphization at compile time — no type erasure.

  • Modern build system. PasBuild with project.xml; no makefiles.

  • First-class debugger. OPDF is the default debug format; DWARF is not required.

See docs/design.adoc for the full architecture and implementation plan.

The result — A modern, cross-platform Object Pascal compiler targeting native code via QBE (and eventually LLVM). Single language mode, single string type, zero-GUID interfaces, reified generics, and first-class OPDF debug format support.