A new self-hosting Object Pascal compiler is drawing attention for discarding 30 years of legacy ecosystem complexity in favor of a unified, modern design with automatic reference counting, native UTF-8 support, and a streamlined build system, positioning itself as a third option beyond proprietary Delphi and legacy-laden Free Pascal.
Blaise: A Self-Hosting, Modern Object Pascal Compiler Strips Legacy to Focus on Memory Safety and Developer Productivity

Object Pascal has maintained a niche but dedicated developer community for more than 40 years, stemming from its origins as a teaching language in the 1970s and its growth into a commercial powerhouse via Borland Delphi in the 1990s. For most of the past two decades, developers working with the language have faced a binary choice. Embarcadero Delphi remains the primary proprietary option, offering strong tooling and commercial support but locking users into a Windows-first ecosystem with per-seat licensing costs. Free Pascal Compiler, the leading open-source alternative, provides cross-platform support and zero licensing fees, but carries 30 years of accumulated design decisions made to preserve backward compatibility with older Pascal dialects. These include five separate language modes, five distinct string types, and thousands of include files that make static analysis and tooling development difficult.
This tension between preserving legacy compatibility and modernizing language design is not unique to Pascal. Recent years have seen new compiler projects for older languages, including Zig for C and Carbon for C++, prioritize clean slate designs that discard decades of backward compatibility to improve safety, performance, and developer experience. The Blaise compiler, a new open-source project hosted under the graemeg/blaise repository on GitHub, is the latest entry in this trend for the Pascal ecosystem.
Built entirely from scratch for modern development workflows, Blaise discards all legacy Pascal features that conflict with goals of memory safety, developer productivity, and high-performance native code generation. The project has already hit a major milestone: it is self-hosting, meaning the compiler can compile its own source code, and produces byte-for-byte identical output when recompiling itself. This self-hosting capability is paired with a test-driven development approach that has produced more than 1200 tests covering core compiler functionality.
The project's design philosophy is outlined in detail in its design documentation, which prioritizes unification over compatibility. Blaise supports exactly one language mode, eliminating the {$mode} switches that Free Pascal and Delphi require to toggle between legacy and modern dialects. It uses a single string type: a UTF-8 reference-counted string for text data, with a separate RawBytes type reserved for binary data, replacing the four legacy string types (ShortString, AnsiString, WideString, UnicodeString) supported by older Pascal toolchains.
Memory management follows a similarly unified model. Automatic reference counting (ARC) applies uniformly to strings, classes, and interfaces, eliminating the split between TObject (no reference counting) and TInterfacedObject (reference counted) that forces developers to make manual memory management choices in Free Pascal and Delphi. Cycles in reference counting are resolved using a [Weak] attribute, and the Free method is retained only as a synonym for immediate release, rather than a mandatory call for memory cleanup.
Interface dispatch also drops legacy Windows COM holdovers. COM-style GUIDs, which Free Pascal and Delphi require for interface identification, are removed entirely. Blaise uses compile-time vtable mapping for interface dispatch, reducing complexity and avoiding the need for GUID generation or registration. Generics are reified via monomorphization at compile time, meaning no type erasure occurs, a common limitation in languages that rely on type-erased generics for backward compatibility.
Build tooling is similarly modernized. Blaise replaces makefiles with PasBuild, a build system that uses project.xml files to manage module dependencies. The root project.xml acts as an aggregator for the compiler binary, runtime library, and tooling modules, each of which has its own project.xml file. Debugging uses the OPDF format as a first-class default, rather than the more common DWARF format, which the project team argues is better suited for Pascal-specific debugging needs and reduces reliance on external debug tooling.
The compiler currently uses a QBE backend to generate native code, with an LLVM backend in active development. QBE is vendored directly into the repository and built from source alongside the compiler, using a host C compiler (gcc or clang) and linker (GNU ld, lld, or macOS ld). All four initial development phases are complete: the bootstrap pipeline produces Hello World on Linux x86_64 via PasBuild, the type system supports classes, records, ARC, and exceptions, generics and zero-GUID interfaces are fully implemented, and OPDF debug info emission works correctly.
Phase 5 of development is in progress, adding the LLVM backend, Windows support, and macOS ARM64 support. Later phases will introduce a Language Server Protocol (LSP) implementation and VS Code extension, followed by a migration analyzer tool to help developers port codebases from Free Pascal or Delphi to Blaise. The migration analyzer is a critical planned feature, as Blaise explicitly drops many features that legacy Pascal codebases rely on.
Dropped features include old-style object types (replaced by records for stack-based value types and classes for heap-based reference types), COM GUIDs, multiple language modes, and legacy I/O routines like assign, reset, rewrite, and blockread (replaced by a stream-based I/O RTL). The project maintains a full list of removed features and their replacements in its documentation, making the trade-offs explicit for developers evaluating the compiler.
Despite the progress, Blaise remains in an early stage of development. The core architecture is not yet finalized, so the maintainers are not accepting code contributions at this time. Feedback on language design, syntax choices, and future direction is welcome via the GitHub Discussions tab, but the project is not yet open to external pull requests. This limited contribution model, paired with a small core team and no commercial backing, raises questions about long-term sustainability.
Sustaining development will require significant community adoption, which may be challenging given the ecosystem gap between Blaise and existing Pascal toolchains. Free Pascal has decades of contributed libraries, framework support, and community tooling, none of which is directly compatible with Blaise's unified language mode. Building a comparable ecosystem from scratch will take years, even if the compiler itself is stable. Performance benchmarks are not yet publicly available, so it is unclear how Blaise's QBE and future LLVM backends will compare to Free Pascal's mature code generation or Delphi's highly optimized commercial compiler.
Reactions from the Pascal community are split. Some developers argue that stripping away legacy features is the right call for a modern Pascal compiler, as it reduces cognitive overhead for new developers and makes tooling like LSPs and debuggers easier to build. Others counter that backward compatibility is the only reason Pascal remains relevant for many enterprise users, who have millions of lines of legacy code that cannot be easily ported. Blaise's success will likely depend on whether it can attract developers who want a clean, modern Pascal dialect for new projects, rather than trying to replace existing toolchains for legacy codebases.
For developers interested in testing Blaise, prerequisites include Free Pascal Compiler 3.2.2 or later (used to build the initial Blaise binary), PasBuild, a host C compiler, and a linker. Build commands are straightforward: pasbuild compile builds all modules in the correct dependency order (rtl → compiler → tools), pasbuild compile -p debug adds debug flags, and pasbuild test runs the full test suite. The compiler binary outputs to compiler/target/blaise after building, and can compile single Pascal files or project.xml configurations, with an option to emit QBE IR for compiler debugging.
Licensing uses the Apache License v2.0 with a Runtime Library Exception, meaning the runtime library can be used in proprietary projects without requiring derivative works to be open-sourced, similar to the license for Free Pascal's runtime library. This licensing choice is designed to encourage adoption for commercial and open-source projects alike.

Comments
Please log in or register to join the discussion