43 min read

> "Pascal's ecosystem is smaller than Python's. It is also older, more stable, and more focused. Whether that is an advantage or a disadvantage depends entirely on what you are building."

Learning Objectives

  • Describe the architecture and capabilities of the Free Pascal compiler
  • Evaluate the Lazarus IDE's component ecosystem, package manager, and community packages
  • Compare Free Pascal and Delphi in terms of dialect differences, licensing, and use cases
  • Identify and evaluate essential Pascal libraries for networking, databases, games, and web development
  • Navigate the Pascal community: forums, conferences, and contribution pathways
  • Assess Pascal's position in industry and the job market

Chapter 39: The Pascal Ecosystem: Free Pascal, Delphi, Lazarus, Libraries, and Community

"The best language is the one with the best ecosystem." — Attributed to many, agreed upon by few

"Pascal's ecosystem is smaller than Python's. It is also older, more stable, and more focused. Whether that is an advantage or a disadvantage depends entirely on what you are building." — Practical observation


Throughout this textbook, we have used Free Pascal and Lazarus as our tools. We have compiled programs, designed forms, connected databases, and served HTTP requests. But we have treated these tools largely as given — black boxes that do their jobs while we focus on the Pascal language itself.

This chapter opens those black boxes. We will examine the Free Pascal compiler in depth: its history, its architecture, the remarkable range of platforms it supports, and the ways it extends standard Pascal. We will explore Lazarus beyond the form designer, looking at its component ecosystem, its package manager, and the community packages that extend its capabilities. We will meet Delphi — Embarcadero's commercial Pascal, still actively developed, still powering enterprise applications worldwide — and understand how it relates to Free Pascal. We will survey the essential libraries that make Pascal a practical choice for real-world development. And we will map the Pascal community: where it lives, how it communicates, and how you can contribute.

By the end of this chapter, you will understand not just the Pascal language but the Pascal world — the people, tools, and resources that make that language useful.


39.1 The Free Pascal Project

History

The Free Pascal project began in 1993, when Florian Klaempfl, a student at the Technical University of Munich, started writing a Pascal compiler as a personal project. His motivation was practical: Borland's Turbo Pascal was the dominant Pascal compiler for DOS, but it was proprietary, closed-source, and limited to 16-bit real mode on x86 processors. The computing world was moving to 32-bit protected mode, and Borland was transitioning to Delphi (Windows only). There was no free, open-source Pascal compiler that supported modern hardware.

Klaempfl's compiler, initially called FPK-Pascal, grew steadily. By 1997, it had attracted enough contributors to become a serious project. In 2000, version 1.0 was released — a milestone that marked the compiler as production-ready. The project was renamed Free Pascal Compiler (FPC), and development accelerated.

Today, Free Pascal is maintained by a core team of approximately ten active developers, with contributions from a broader community. The compiler is released under the GNU General Public License (GPL) with a special linking exception that allows the compiled binaries to be distributed under any license — the same model used by the GNU C Compiler (GCC). This means that your programs, compiled with Free Pascal, can be proprietary, open-source, or anything in between.

Version History

Version Year Key Milestones
1.0 2000 First stable release. x86 Linux and DOS. Turbo Pascal compatibility.
2.0 2005 Object Pascal support, operator overloading, PowerPC and SPARC targets.
2.2 2007 x86-64 support, improved optimization, Mac OS X Intel target.
2.4 2009 Generics (basic support), improved Delphi compatibility.
2.6 2012 ARM support, improved generics, Objective-Pascal for macOS/iOS.
3.0 2015 Advanced records, improved generics, ARMHF and AArch64 targets.
3.2 2020 Anonymous functions, management operators, improved AArch64, RISC-V target.
3.4 2025 (dev) Improved inline variables, enhanced generics, WebAssembly improvements.

Each release adds features while maintaining backward compatibility with previous versions. A program written for Free Pascal 2.0 in 2005 will still compile with Free Pascal 3.2 in 2026. This stability is a deliberate design goal — the Free Pascal team values reliability over novelty.

Compiler Architecture

The Free Pascal compiler is a self-hosting compiler — it is written entirely in Pascal and compiles itself. This is a significant engineering achievement and a powerful demonstration of Pascal's capabilities. The compiler that compiled PennyWise was itself compiled by a previous version of the same compiler.

The compilation pipeline has four stages:

  1. Lexer and Parser. The source code is tokenized and parsed into an abstract syntax tree (AST). Free Pascal supports multiple Pascal dialects, selected by the {$mode}` directive: `{$mode objfpc} (Free Pascal's native Object Pascal), {$mode delphi}` (Delphi-compatible mode), `{$mode tp} (Turbo Pascal compatible), and {$mode fpc} (default Free Pascal mode).

  2. Semantic Analysis. The AST is type-checked, overloaded operators are resolved, generic types are instantiated, and the code is validated against Pascal's strict type rules. This is where most compile-time errors are caught.

  3. Optimization. The validated AST is transformed into an intermediate representation and optimized. Free Pascal supports multiple optimization levels (-O1 through -O4), including constant folding, dead code elimination, common subexpression elimination, loop unrolling, and register allocation optimization.

  4. Code Generation. The optimized intermediate representation is translated into machine code for the target platform. Free Pascal includes code generators for: - x86 (32-bit) and x86-64 (64-bit) - ARM (32-bit) and AArch64 (64-bit) - MIPS, MIPS64 - PowerPC, PowerPC64 - SPARC, SPARC64 - RISC-V (32-bit and 64-bit) - WebAssembly (experimental) - JVM bytecode (experimental)

Supported Platforms

Free Pascal supports an extraordinary range of operating systems and processor architectures. As of version 3.2, the officially supported targets include:

Operating System Architectures
Windows x86, x86-64, ARM (WinCE)
Linux x86, x86-64, ARM, AArch64, MIPS, PowerPC, SPARC, RISC-V
macOS x86-64, AArch64 (Apple Silicon)
FreeBSD x86, x86-64
Android ARM, AArch64, x86
iOS AArch64
Embedded (bare metal) ARM, AVR, MIPS, Xtensa
Haiku x86, x86-64
OS/2 (eComStation) x86
DOS (via DPMI) x86

This means that the Pascal you have learned in this textbook can be used to write software for smartphones, desktop computers, servers, embedded systems, and even legacy DOS and OS/2 environments. No other free compiler for any language supports this range of targets from a single codebase.

📊 Perspective: Why Platform Support Matters Most programmers never target more than two or three platforms. But the existence of broad platform support tells you something about the compiler's engineering quality. A compiler that generates correct code for twelve processor architectures and a dozen operating systems has been tested against an enormous variety of edge cases. The x86 code generator is more reliable because the ARM code generator exists — they share a common intermediate representation and catch each other's bugs.

Free Pascal Extensions to Standard Pascal

Free Pascal extends Wirth's original Pascal (and Borland's Turbo Pascal/Delphi) with several modern features:

Generics (since FPC 2.4):

type
  generic TStack<T> = class
    procedure Push(Item: T);
    function Pop: T;
  end;

Operator overloading (since FPC 2.0):

operator + (A, B: TVector): TVector;
begin
  Result.X := A.X + B.X;
  Result.Y := A.Y + B.Y;
end;

Anonymous functions (since FPC 3.2):

Sorted := List.Sort(
  function(const A, B: TTransaction): Integer
  begin
    Result := CompareDateTime(A.Date, B.Date);
  end);

Advanced records (since FPC 3.0):

type
  TPoint = record
    X, Y: Double;
    class operator + (A, B: TPoint): TPoint;
    function DistanceTo(Other: TPoint): Double;
  end;

Management operators (since FPC 3.2) for automatic initialization and finalization of records, bringing limited RAII (Resource Acquisition Is Initialization) to Pascal:

type
  TManagedBuffer = record
    Data: Pointer;
    class operator Initialize(var Rec: TManagedBuffer);
    class operator Finalize(var Rec: TManagedBuffer);
  end;

These extensions make Free Pascal a thoroughly modern language while maintaining backward compatibility with millions of lines of existing Pascal code.

The Standard Library

Free Pascal ships with a comprehensive standard library organized into several packages:

RTL (Run-Time Library) — The core library, always available: - System — Fundamental types, string operations, mathematical functions, I/O. - SysUtils — File operations, date/time functions, string utilities, exception classes. - ClassesTList, TStringList, TStream, TComponent — the foundational collection and streaming classes. - Math — Extended mathematical functions: trigonometry, statistics, financial calculations. - DateUtils — Date and time manipulation: DaysBetween, IncMonth, StartOfTheWeek. - StrUtils — Advanced string operations: ReplaceStr, SplitString, StartsStr. - Generics.Collections — Generic TList<T>, TDictionary<TKey, TValue>, TStack<T>, TQueue<T>.

FCL (Free Component Library) — Higher-level libraries: - fcl-json — JSON parsing and generation (fpjson, jsonparser, jsonscanner). - fcl-xml — XML reading and writing (DOM, SAX, XMLRead, XMLWrite). - fcl-web — HTTP server, HTTP client, CGI support, FastCGI. - fcl-net — Low-level networking: sockets, DNS resolution, SSL. - fcl-db — Database connectivity framework (SQLDB): SQLite, PostgreSQL, MySQL, Oracle, ODBC. - fcl-pdf — PDF document generation. - fcl-image — Image loading and manipulation (PNG, JPEG, BMP, GIF). - fcl-process — Process management: launching child processes, reading their output. - fcl-passrc — Pascal source code parser (used by Lazarus itself for code analysis).

Packages — Additional libraries: - regexpr — Regular expression support. - hash — Cryptographic hash functions (MD5, SHA-1, SHA-256, SHA-512). - openssl — OpenSSL bindings for TLS/SSL. - libtar — TAR archive reading and writing.

This standard library is more comprehensive than many developers realize. Before searching for a third-party package, check whether the FCL already provides what you need — it often does.

Compilation Modes and Optimization

Free Pascal offers fine-grained control over compilation:

# Debug build: no optimization, full debug info
fpc -g -gl -O0 MyProgram.pas

# Release build: maximum optimization, strip debug info
fpc -O3 -Xs MyProgram.pas

# Cross-compile for Linux x86-64 from Windows
fpc -Tlinux -Px86_64 MyProgram.pas

# Compile in Delphi compatibility mode
fpc -Mdelphi MyProgram.pas

Optimization levels: - -O0 — No optimization. Fastest compilation, easiest debugging. - -O1 — Basic optimization. Constant folding, dead code elimination. - -O2 — Standard optimization. Register allocation, peephole optimization. - -O3 — Aggressive optimization. Loop unrolling, function inlining, instruction scheduling. - -O4 — Whole-program optimization. Link-time optimization across units.

For PennyWise 2.0, the difference between -O0 and -O3 is negligible in a GUI application (the bottleneck is user interaction, not computation). For compute-intensive applications — numerical simulations, image processing, game engines — the optimization level can make a factor-of-two or greater difference in performance.


39.2 Lazarus IDE Deep Dive

Beyond the Form Designer

Throughout Part V, we used Lazarus primarily as a form designer and project manager. But Lazarus is a full integrated development environment with capabilities that rival commercial IDEs:

Code completion and navigation. Press Ctrl+Space to see available identifiers at any point in your code. Ctrl+Click on any identifier to jump to its declaration. Ctrl+Shift+Up toggles between a method's interface declaration and its implementation. These features make navigating a multi-unit project like PennyWise significantly faster.

Integrated debugger. Lazarus includes a graphical front-end to GDB (on Linux/macOS) and GDB or LLDB for debugging. Set breakpoints by clicking in the gutter, inspect variables in the Watch window, step through code line by line, and examine the call stack. For PennyWise, this means you can set a breakpoint in TFinanceDatabase.SaveTransaction, add a new expense in the GUI, and watch the debugger pause execution at the exact moment the SQL query is about to execute.

Refactoring tools. Rename a variable, procedure, or class, and Lazarus updates all references across the entire project. Extract a block of code into a new procedure. Invert an if-then-else block. These are not revolutionary features — most modern IDEs have them — but they are well-implemented and save significant time on larger projects.

Built-in terminal. Run command-line programs and see their output without leaving the IDE.

Code templates and macros. Define reusable code snippets that expand on a shortcut. For example, type tryf and press Ctrl+J to expand into a complete try..finally..end block.

Source code analysis (CodeTools). Lazarus includes a powerful source code analysis engine called CodeTools that powers many of the IDE's features. CodeTools parses the entire project (not just the current file), resolves identifier references across units, and provides:

  • Find declaration: Jump to the declaration of any identifier, even if it is in a different unit.
  • Find usages: Find every place in the project where a given identifier is used.
  • Abstract method completion: When you create a class that inherits from an abstract class, Lazarus can automatically generate stub implementations for all abstract methods.
  • Missing method creation: If you write a method call in the implementation section before declaring it in the interface, Lazarus can create the declaration for you.

Project groups. For large projects that consist of multiple applications or libraries (like PennyWise 2.0 with its main application, test runner, and potentially a command-line companion), Lazarus supports project groups that manage multiple .lpi files as a single workspace.

Anchor docking. Lazarus allows you to rearrange the IDE's windows (editor, Object Inspector, form designer, messages, debugger) into a custom layout by docking panels together, creating a workspace optimized for your screen size and workflow preferences.

Performance and Compilation Speed

One of Lazarus's inherited strengths from the Turbo Pascal tradition is compilation speed. The Free Pascal compiler, invoked from within Lazarus, compiles typical projects in seconds — a small program in under a second, a project the size of PennyWise 2.0 in two to five seconds. This speed enables the rapid edit-compile-run cycle that makes Pascal development feel interactive and experimental.

For comparison, a C++ project of similar size typically takes thirty seconds to several minutes to compile. A Java project requires JVM startup time on top of compilation. A Rust project (which performs extensive borrow checking) can take significantly longer for first compilations. Pascal's fast compilation is not just a convenience — it is a fundamental enabler of the iterative development style that produces better software.

The Component Palette

Lazarus ships with over 200 components organized into palette tabs:

Tab Components Purpose
Standard TButton, TLabel, TEdit, TMemo, TCheckBox, TRadioButton, TListBox, TComboBox, TPanel, TGroupBox Basic user interface elements
Additional TImage, TShape, TBevel, TSpeedButton, TBitBtn, TMaskEdit, TStringGrid, TDrawGrid Extended interface elements
Common Controls TTrackBar, TProgressBar, TTreeView, TListView, TStatusBar, TToolBar, TPageControl, TTabSheet Windows-style controls
Dialogs TOpenDialog, TSaveDialog, TFontDialog, TColorDialog, TPrintDialog, TFindDialog Standard dialogs
Data Controls TDBGrid, TDBEdit, TDBText, TDBComboBox, TDBNavigator, TDBImage Database-connected controls
Data Access TSQLite3Connection, TPostgreSQLConnection, TMySQLConnection, TSQLQuery, TSQLTransaction, TDataSource Database connectivity
System TTimer, TIdleTimer, TTrayIcon, TProcess, TFileSearcher System integration
Misc TColorButton, TSpinEdit, TFloatSpinEdit, TDirectoryEdit, TFileNameEdit, TDateEdit Utility controls
Chart TChart, TLineSeries, TBarSeries, TPieSeries, TAreaSeries Data visualization

PennyWise 2.0 uses components from at least seven of these tabs. The TStringGrid displays transactions. The TChart and TPieSeries show spending by category. The TSQLite3Connection and TSQLQuery connect to the database. The TTrayIcon provides system tray integration. The TDateTimePicker selects dates. The TFloatSpinEdit enters amounts.

The Online Package Manager (OPM)

Lazarus includes a package manager (accessible via Package > Online Package Manager) that provides one-click installation of community packages. As of 2026, the OPM hosts over 300 packages, including:

  • LazReport — A report designer and generator for creating printable reports from data.
  • BGRABitmap — An advanced 2D graphics library with anti-aliasing, gradient fills, path rendering, and image processing. Far more capable than the standard TCanvas.
  • Castle Game Engine — A full-featured 3D and 2D game engine written in Pascal, with a visual editor, physics engine, and support for glTF/X3D model formats.
  • mORMot — An enterprise-grade Object-Relational Mapping (ORM) and SOA framework.
  • Brook Framework — A microframework for building web applications in Pascal, inspired by Sinatra (Ruby) and Flask (Python).
  • Indy — Internet Direct, a comprehensive networking library for HTTP, SMTP, POP3, FTP, and dozens of other protocols.
  • Synapse — A lightweight alternative to Indy for basic networking (HTTP, SMTP, TCP/UDP).
  • PowerPDF — PDF generation library for creating documents programmatically.
  • ZeosLib — Database connectivity for MySQL, PostgreSQL, Oracle, MSSQL, and others.
  • VirtualTreeView — A high-performance tree/list view that can display millions of nodes.

To install a package: open OPM, find the package, click Install, and restart the IDE. The package's components appear on the palette, and its units are available in your uses clause.

Installing Packages Manually

Not all packages are in the OPM. Some community packages are distributed as source code on GitHub, GitLab, or SourceForge. To install these manually:

  1. Download or clone the package source.
  2. In Lazarus, go to Package > Open Package File (.lpk).
  3. Navigate to the .lpk file in the downloaded source.
  4. Click Compile to verify it builds.
  5. Click Use > Install to add the components to the IDE.
  6. Lazarus will rebuild itself and restart with the new components.

This process takes about a minute and works for any Lazarus package, regardless of where it was obtained. The .lpk file format is an XML descriptor that specifies the package's units, dependencies, and compilation options.

Creating Your Own Packages

If you build a useful component or library, you can package it for distribution. Creating a Lazarus package involves:

  1. Create the package: Package > New Package in Lazarus. Give it a descriptive name (e.g., pw_finance_widgets).
  2. Add units: Add your source files to the package. Specify which units are in the interface (visible to users) and which are internal.
  3. Set dependencies: If your package depends on other packages (e.g., LCL, TAChart), declare these dependencies.
  4. Write a README.md explaining what the package does, how to use it, and any requirements.
  5. Test on multiple platforms if the package is intended to be cross-platform.
  6. Distribute: Publish on GitHub, submit to the OPM, or share on the Lazarus forums.

The package system is one of Lazarus's underappreciated strengths. It enables modular development, dependency management, and code reuse — the same benefits that npm provides for JavaScript or PyPI provides for Python, but with the additional advantage that packages are compiled to native code, not interpreted.

💡 PennyWise in Context PennyWise 2.0 uses only the packages that ship with Lazarus — no additional packages are required. But if you wanted to extend it, the ecosystem provides everything you need: BGRABitmap for custom chart rendering, PowerPDF for report generation, Brook Framework for a web companion app, or mORMot for a more sophisticated ORM layer. The packages exist. The ecosystem supports professional development.


39.3 Delphi: The Commercial Pascal

History

Delphi's story begins with Anders Hejlsberg, a Danish software engineer who wrote Turbo Pascal for Borland in 1983. Turbo Pascal was revolutionary — it compiled Pascal code nearly instantly, included an integrated editor, and cost only $49.95. It made Pascal accessible to millions of developers and made Borland one of the most important software companies of the 1980s.

In 1995, Hejlsberg and his team at Borland released Delphi: an object-oriented Pascal development environment with a visual form designer, a component-based architecture, and native compilation. Delphi was, in many ways, the first true Rapid Application Development (RAD) environment. You could drag a button onto a form, double-click it to create an event handler, and have a working application in minutes. Visual Basic could do something similar, but Visual Basic was interpreted and slow. Delphi produced native Win32 executables.

Delphi dominated Windows desktop development from 1995 through the early 2000s. Companies built their core business applications in Delphi: accounting systems, medical records, logistics management, point-of-sale terminals, industrial control systems. Many of these applications are still running today — maintained, extended, and often critical to the businesses that depend on them.

The corporate ownership of Delphi changed several times: Borland sold its development tools division to Embarcadero Technologies in 2008. Embarcadero was acquired by Idera in 2015. Through all these transitions, Delphi continued to be developed and released. The current version (as of 2026) is Delphi 12 Athens, which supports Windows, macOS, Linux, iOS, and Android through its FireMonkey (FMX) cross-platform framework.

Delphi's Frameworks

Delphi provides two GUI frameworks:

VCL (Visual Component Library) — Windows-only, native Win32/Win64 controls. Applications built with VCL look and behave exactly like native Windows applications because they are native Windows applications. VCL is the framework of choice for Windows-only desktop development and is the spiritual ancestor of Lazarus's LCL.

FireMonkey (FMX) — Cross-platform, GPU-accelerated UI framework. FMX applications run on Windows, macOS, Linux, iOS, and Android from a single codebase. The controls are custom-rendered (not native OS controls), which gives them a consistent appearance across platforms but means they may not look precisely like native applications on any single platform.

Delphi's Database Connectivity: FireDAC

Delphi's database connectivity framework, FireDAC, deserves special mention because it represents a significant advantage over Free Pascal's SQLDB for database-heavy applications. FireDAC provides:

  • Universal connectivity. A single API for MySQL, PostgreSQL, Oracle, Microsoft SQL Server, SQLite, InterBase/Firebird, IBM DB2, Informix, MongoDB, and more. Switching databases often requires only changing a connection string.
  • Array DML. Execute parameterized queries with arrays of values, inserting or updating hundreds of rows in a single call. This is dramatically faster than executing individual queries in a loop — for PennyWise's CSV import feature, this could reduce import time from minutes to seconds for large files.
  • Connection pooling. Automatic management of database connections, reusing idle connections instead of opening new ones. Essential for server applications with many concurrent users.
  • Local SQL. Execute SQL queries against in-memory datasets, CSV files, or JSON data without a database server. This enables SQL-based filtering and aggregation on client-side data.
  • Tracing and monitoring. Built-in tools for logging every SQL query, measuring execution time, and diagnosing performance problems.

Free Pascal's SQLDB provides the core functionality (connections, queries, transactions), and for PennyWise's scale (a single user, a few thousand transactions), SQLDB is more than adequate. But for enterprise applications with thousands of concurrent users and millions of records, FireDAC's advanced features justify Delphi's license cost.

Delphi Licensing

Delphi is commercial software with several license tiers:

Edition Price (approximate, 2026) Target
Community Free Students, hobbyists, startups under $5,000 revenue
Professional ~$1,500/year Professional developers, small teams
Enterprise ~$4,000/year Enterprise features, additional database connectivity
Architect ~$6,000/year Full feature set, modeling tools

The Community Edition is notable: it is free for individual developers and small businesses, making it a legitimate option for learning and small projects. However, it has revenue limits and the license must be renewed annually.

For this textbook, we use Free Pascal and Lazarus because they are free, open-source, and available on every platform without restrictions. But Delphi is a serious professional tool, and many Pascal developers use both.


39.4 Free Pascal vs. Delphi: Dialect Differences

Free Pascal aims for a high degree of Delphi compatibility, and in {$mode delphi}, most Delphi code compiles without changes. However, there are differences worth knowing:

Syntax Differences

Feature Free Pascal ({$mode objfpc}) Delphi
Generics specialize TList<Integer> or generic keyword TList<Integer> directly
Address-of operator @Procedure @Procedure (same, but FPC also allows Addr())
String types AnsiString default, {$H+} for long strings UnicodeString default (since Delphi 2009)
Pointer arithmetic {$POINTERMATH ON} for C-style arithmetic Default for typed pointers
Anonymous methods Supported since FPC 3.2 (with reference to) Supported since Delphi 2009
Inline variables var X: Integer = 5; in a block (FPC trunk) var X := 5; inline (since Delphi 10.3)
Class helpers Supported Supported (introduced in Delphi 2005)

The Mode Directive

Free Pascal's {$mode} directive is the key to compatibility:

{$mode delphi}     { Maximum Delphi compatibility }
{$mode objfpc}     { Free Pascal's native Object Pascal — recommended }
{$mode tp}         { Turbo Pascal compatibility }
{$mode fpc}        { Free Pascal default (older, less OOP) }
{$mode macpas}     { Macintosh Pascal compatibility }

For new projects, {$mode objfpc}` is recommended — it enables all of Free Pascal's modern features. For porting existing Delphi code, `{$mode delphi} provides the smoothest transition. Throughout this textbook, we have used {$mode objfpc} exclusively.

The String Situation

The most significant difference between Free Pascal and modern Delphi is string handling. Delphi switched its default string type from AnsiString (one byte per character) to UnicodeString (two bytes per character, UTF-16 encoded) in Delphi 2009. Free Pascal still defaults to AnsiString but fully supports UnicodeString and includes a UTF-8-based String type when {$mode delphiunicode} is used.

For most applications — including PennyWise — this difference is invisible. The strings work correctly regardless. But if you are porting code between Free Pascal and Delphi, or working with multilingual text, understanding the string types is essential.

Here is a practical example of the difference:

{ In Delphi (default UnicodeString): }
var S: String;  { This is UnicodeString, 2 bytes per character }
begin
  S := 'Hello';
  WriteLn(SizeOf(S[1]));  { Output: 2 }
end;

{ In Free Pascal (default AnsiString): }
var S: String;  { This is AnsiString, 1 byte per character }
begin
  S := 'Hello';
  WriteLn(SizeOf(S[1]));  { Output: 1 }
end;

For ASCII text (English, most programming identifiers), this does not matter — both types store the same characters correctly. For multilingual text (Chinese, Arabic, emoji), the encoding matters: Delphi's UnicodeString uses UTF-16 (which handles all Unicode characters but uses more memory), while Free Pascal's default AnsiString can use UTF-8 (which is compact for ASCII but variable-width for other characters). Free Pascal's UnicodeString type is available and behaves identically to Delphi's when you need full compatibility.

Porting Code Between FPC and Delphi

If you need to maintain a codebase that compiles with both Free Pascal and Delphi, several strategies help:

  1. Use {$mode delphi} in Free Pascal for maximum syntax compatibility.
  2. Use {$IFDEF FPC}` and `{$IFDEF DELPHI} conditionals for sections where the compilers differ.
  3. Avoid FPC-specific features (like specialize for generics) in shared code.
  4. Test on both compilers regularly — do not wait until the end to discover incompatibilities.

Many open-source Pascal libraries (including mORMot and Indy) maintain dual FPC/Delphi compatibility using these techniques. It is extra work, but it doubles the potential user base.

⚠️ Practical Advice: Choosing Between FPC and Delphi If you are learning Pascal (as a student or hobbyist): use Free Pascal + Lazarus. It is free, open-source, and this textbook is built around it. If you are developing commercially for Windows: evaluate Delphi's Community Edition. The VCL provides the most polished Windows-native experience. If you need true cross-platform (including mobile): evaluate both. Lazarus supports Windows, Linux, and macOS well. Delphi's FireMonkey adds iOS and Android. If you are working on embedded systems or unusual platforms: Free Pascal's platform support is unmatched.


39.5 Essential Libraries and Packages

The Pascal ecosystem provides libraries for virtually every common programming task. Here is a curated list of the most important ones:

Networking

Synapse (https://synapse.ararat.cz/) A lightweight networking library providing TCP/UDP sockets, HTTP client, SMTP client, and SSL/TLS support. Simple, well-documented, and easy to integrate. We used concepts from Synapse-style networking in Chapter 35.

Indy (https://www.indyproject.org/) Internet Direct — a comprehensive networking library originally developed for Delphi, now also available for Free Pascal. Supports dozens of protocols: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, SSH, LDAP, DNS, and more. Larger and more complex than Synapse, but more feature-complete.

Free Pascal's fcl-web The built-in web framework included with Free Pascal. Provides TFPHTTPServer for serving HTTP, TFPHTTPClient for making HTTP requests, CGI module support, and the FastCGI protocol. We used fcl-web concepts in Chapter 35 for PennyWise's REST endpoint.

Web Frameworks

Brook Framework 4 (https://github.com/risoflora/brookframework) A microframework for building web applications in Pascal. Inspired by Ruby's Sinatra and Python's Flask. Brook 4 (the current major version) provides routing, middleware, request/response handling, and static file serving. It uses the Sagui C library internally for HTTP handling, giving it excellent performance. A basic Brook 4 web server looks remarkably clean:

uses BrookHTTPServer, BrookHTTPRequest, BrookHTTPResponse;

procedure DoRoute(ARequest: TBrookHTTPRequest;
  AResponse: TBrookHTTPResponse);
begin
  AResponse.Send('Hello from PennyWise API!', 'text/plain', 200);
end;

If you want to build a web companion for PennyWise — a lightweight API that serves expense data to a mobile app or a web dashboard — Brook 4 is the starting point. The routing DSL is intuitive, the documentation is clear, and the resulting server is fast enough for production use.

mORMot 2 (https://github.com/synopse/mORMot2) An enterprise-grade framework that includes an ORM, a REST server, JSON serialization, authentication, a high-performance HTTP server, and much more. mORMot 2 is the most ambitious single library in the Pascal ecosystem — it is comparable in scope to .NET's Entity Framework + ASP.NET combined, but for Pascal. It is used in production systems handling millions of requests per day.

Key mORMot 2 capabilities: - ORM — Map Pascal classes directly to database tables. Define a class, and mORMot handles CREATE TABLE, INSERT, UPDATE, DELETE, and SELECT automatically. - REST server — Expose your ORM models as RESTful endpoints with authentication, authorization, and JSON serialization. - High-performance HTTP — mORMot's HTTP server can handle thousands of concurrent connections using kernel-mode HTTP (http.sys on Windows) or its own socket implementation. - Cross-database — Supports SQLite, PostgreSQL, MySQL, Oracle, MSSQL, MongoDB, and more through a unified interface. - Cryptography — Built-in AES, SHA, JWT, and TLS support.

mORMot has a steep learning curve — the documentation alone spans hundreds of pages — but for developers building enterprise Pascal applications, it is an indispensable resource.

Pas2JS (https://wiki.freepascal.org/pas2js) Pas2JS is a Pascal-to-JavaScript transpiler maintained by the Free Pascal team. It compiles Object Pascal source code into JavaScript that runs in web browsers or Node.js. This means you can write web front-end code in Pascal — complete with strong typing, classes, and the familiar Pascal syntax — and have it run in any modern browser.

Pas2JS supports a subset of Object Pascal (classes, generics, interfaces, exceptions) and provides bindings to browser APIs (DOM manipulation, Canvas, fetch, WebSocket). Lazarus includes a Pas2JS integration package that allows you to create web applications using a visual form designer similar to the standard LCL designer.

For PennyWise, Pas2JS could power a web-based dashboard that displays expense charts in the browser, consuming data from a Brook 4 or mORMot REST API. The business logic — expense categorization, budget calculations — could be shared between the desktop application and the web frontend, since both are written in Pascal.

Databases

SQLDB (included with Free Pascal) The database framework we used in PennyWise. Supports SQLite, PostgreSQL, MySQL/MariaDB, Oracle, ODBC, and Microsoft SQL Server through a common interface.

ZeosLib (https://sourceforge.net/projects/zeoslib/) An alternative database connectivity library with support for additional databases and different connection management patterns.

Graphics and Games

BGRABitmap (available via OPM) A 2D graphics library that provides anti-aliased drawing, gradient fills, bezier curves, image filters, and direct pixel manipulation. Significantly more capable than the standard TCanvas.

Castle Game Engine (https://castle-engine.io/) A complete 3D and 2D game engine written in Object Pascal. Features include: a visual editor, physics engine (using Kraft), glTF model loading, sprite sheets, tilemaps, UI system, and audio. If you want to make games in Pascal, Castle is the standard choice.

SDL2 bindings (available via OPM) Pascal headers for the SDL2 library, the industry-standard cross-platform multimedia library. Used for window creation, OpenGL context management, audio, input, and gamepad support.

Cryptography and Security

DCPcrypt (available via OPM) A collection of cryptographic components: AES, DES, Blowfish, SHA-256, SHA-512, MD5, RIPEMD, and others. Useful for encrypting PennyWise's database or implementing password hashing.

OpenSSL bindings (included with Free Pascal) Pascal bindings for the OpenSSL library, providing TLS/SSL support for secure network connections.

Scientific and Mathematical

NumLib (included with Free Pascal) A numerical mathematics library providing linear algebra, interpolation, integration, and statistical functions.

PascalSCADA (available via OPM) A library for industrial automation — SCADA (Supervisory Control and Data Acquisition) components for reading from PLCs, Modbus devices, and OPC servers.

Serialization

fpjson (included with Free Pascal) A JSON parser and generator. We used JSON concepts in Chapter 34 for PennyWise's export feature.

laz2_XMLRead / laz2_XMLWrite (included with Lazarus) XML reading and writing libraries. Faster alternatives: SAX-based parser for large XML files.

Testing Frameworks

FPCUnit (included with Free Pascal) Free Pascal's built-in unit testing framework, modeled after JUnit and DUnit. We used FPCUnit in Chapter 38 to test PennyWise's business logic. It provides test fixtures, assertions, test suites, and both console and GUI test runners.

FPTest (available separately) A lighter-weight testing framework that some developers prefer for smaller projects. Provides basic assertion functionality without the full fixture infrastructure.

Utility Libraries

LGenerics (available via OPM) A comprehensive library of generic data structures and algorithms: sorted arrays, hash maps, priority queues, graph algorithms (shortest path, minimum spanning tree, topological sort), string matching (Aho-Corasick, Boyer-Moore), and more. If you need a production-quality implementation of an algorithm from Part IV of this textbook, check LGenerics first.

fpSpreadsheet (available via OPM) A library for reading and writing spreadsheet files (XLSX, ODS, CSV). If PennyWise needed to export reports in Excel format rather than plain CSV, fpSpreadsheet would be the solution.

MultiLog (available via OPM) A logging framework with multiple output targets (file, console, network) and log levels (debug, info, warning, error). Professional applications need structured logging — WriteLn debugging does not scale.

A Note on Package Quality

Not all packages in the OPM are equal. Some are actively maintained, well-documented, and production-tested. Others are abandoned experiments with minimal documentation. Before depending on a package:

  1. Check the last update date. A package last updated in 2018 may not compile with the current Free Pascal version.
  2. Check for documentation. Even a README with basic usage examples is essential.
  3. Check the license. Most OPM packages use MIT, LGPL, or GPL licenses, but verify before including a package in a commercial project.
  4. Check for dependencies. Some packages depend on other packages, which may have their own compatibility issues.

The packages listed in this section are all actively maintained, well-documented, and widely used. They are safe choices.


39.6 The Pascal Community

The Pascal community is smaller than Python's or JavaScript's. But it has qualities that larger communities often lack: stability, depth of knowledge, and a remarkable willingness to help newcomers.

Online Communities

Free Pascal and Lazarus Forums (https://forum.lazarus-ide.org/) The primary gathering place for the Free Pascal and Lazarus community. Active since 2005, with hundreds of posts per week covering everything from beginner questions to compiler internals. The core Free Pascal developers participate regularly.

Delphi-PRAXiS (https://en.delphipraxis.net/) One of the largest Delphi communities, with strong overlap with the Free Pascal community. Historically German-speaking, now primarily English. Excellent for Delphi-specific questions and VCL/FMX programming.

Reddit r/pascal (https://www.reddit.com/r/pascal/) A growing community with discussion of both Free Pascal and Delphi. Good for news, project announcements, and general discussion.

Discord — Several Pascal-focused Discord servers exist, including the Lazarus/FPC Discord and the Castle Game Engine Discord. These provide real-time chat and are particularly popular with younger developers.

Stack Overflow — The [freepascal], [lazarus], and [delphi] tags are active, with knowledgeable answerers. The [delphi] tag alone has over 50,000 questions, making it one of the more active language-specific tags outside the top-ten languages.

Community Culture

The Pascal community has a distinctive character that distinguishes it from larger programming communities:

Patient with beginners. Because the community is smaller, newcomers are welcomed rather than dismissed. A beginner question on the Lazarus forums typically receives a helpful, detailed answer within hours — often from developers who have been using Pascal for decades. This contrasts with larger communities where beginner questions may be closed as duplicates or answered with terse one-liners.

Technically deep. Many members of the Pascal community are experienced professionals who have been writing Pascal for twenty or thirty years. When a technical discussion occurs — about compiler internals, optimization strategies, or platform-specific behavior — the depth of knowledge is remarkable. You are often getting answers from people who have read the compiler source code.

Long-term committed. The Pascal community does not chase trends. Members do not switch to the language-of-the-month. This stability means that relationships and knowledge accumulate over years and decades. A question you ask on the forum today might be answered by someone who answered a similar question ten years ago — and their answer ten years ago is still correct, because the language is stable.

Pragmatic. The Pascal community values working software over theoretical elegance. Discussions focus on "how do I build this?" rather than "what is the theoretically optimal approach?" This pragmatism reflects Pascal's own design philosophy: the language was created to be useful, not to be beautiful for its own sake (though it happens to be both).

Conferences and Events

EKON (Entwickler Konferenz / Developer Conference) — An annual European conference with significant Delphi/Pascal content. Held in Germany, typically in Dusseldorf. EKON attracts both Delphi and Free Pascal developers and features talks on advanced topics: mORMot internals, cross-platform deployment strategies, database optimization, and enterprise architecture. The conference has run annually since the early 2000s.

PascalCon — An online conference dedicated to Pascal, featuring talks from Free Pascal and Lazarus developers, library authors, and community members. PascalCon is free to attend and recordings are available online, making it accessible worldwide. Topics range from beginner tutorials to compiler internals.

Embarcadero CodeRage — An online conference organized by Embarcadero, focused on Delphi and C++Builder. Free to attend. Features product announcements, technical deep-dives, and customer case studies.

International Pascal Congress — An academic conference with a focus on Pascal in education and research. Less frequent than the developer-focused conferences but important for Pascal's presence in the academic community.

Pascal Game Development

The Pascal game development community deserves special mention because it demonstrates that Pascal is viable for creative and performance-intensive work, not just business applications.

Pascal Game Development (PGD) (pascalgamedevelopment.com) has been an active community since 2003. It hosts game development tutorials, game jams, and showcases of games built with Pascal. The annual PGD game jam challenges developers to build a complete game in Pascal within a limited time frame.

Notable Pascal game engines and frameworks:

  • Castle Game Engine — Full 3D/2D engine with visual editor, physics, and cross-platform support. Actively developed with regular releases.
  • Ray4Laz — Pascal bindings for the raylib game programming library. Excellent for 2D games and prototyping.
  • SDL2 bindings — Direct access to SDL2 for window management, input, audio, and rendering.
  • Allegro.pas — Pascal bindings for the Allegro game programming library.
  • SFML bindings — Pascal bindings for Simple and Fast Multimedia Library.

Games built with Pascal range from casual mobile games to complex simulations. The combination of native performance (no garbage collection pauses), strong typing (fewer runtime crashes), and rapid development (fast compilation) makes Pascal a surprisingly effective game development language.

Blogs and Content Creators

Several community members maintain blogs and video channels that provide tutorials, tips, and project showcases:

  • Castle Game Engine blog — Michalis Kamburelis's blog covers game development in Pascal with extensive tutorials.
  • Lazarus Planet — An aggregator of Lazarus-related blog posts from community members.
  • GetLazarus.org — Tutorials and documentation for Lazarus programming.
  • Delphi Worlds — Dave Nottage's blog on cross-platform Delphi development, with extensive mobile-focused content.

39.7 Pascal in Industry

Let us be honest: Pascal does not dominate the job market. It does not top the TIOBE index. It is not the language that startups list in their job postings.

But it is far from irrelevant. Pascal — particularly Delphi — is used in production at thousands of companies worldwide. Here are the sectors where it is most prevalent:

Enterprise Desktop Applications

Many companies built their core business applications in Delphi during the 1995-2005 golden age, and those applications are still running. Accounting systems, inventory management, CRM software, medical records systems, point-of-sale terminals — hundreds of thousands of these applications exist, many of them mission-critical. They need maintenance, updates, and modernization. This creates a steady demand for Pascal/Delphi developers.

Healthcare

Medical software has long regulatory approval cycles. A medical records system or diagnostic tool approved by regulatory authorities cannot be easily rewritten in a different language — the approval process would need to restart. Many of these systems were built in Delphi, and they will be maintained in Delphi for years or decades to come.

Industrial Automation

SCADA systems, PLC programming interfaces, and industrial control software often use Delphi or Free Pascal. The native compilation (important for real-time performance), the database connectivity (essential for data logging), and the mature GUI framework (operators need clear, responsive interfaces) make Pascal a natural fit.

Education

Pascal remains a popular teaching language in several countries, particularly in Russia, Brazil, and parts of Europe. Universities and secondary schools that use Pascal create demand for educational materials, tools, and teacher training. The Russian "Olympiad programming" community, in particular, has a strong Pascal tradition, with many competitive programming platforms supporting Pascal as a submission language.

Embedded Systems

Free Pascal's support for ARM, AVR, and other embedded architectures makes it a viable choice for firmware development. The strong typing and compile-time checking are particularly valuable in embedded contexts where runtime errors can have physical consequences — a buffer overflow in a medical device or an industrial controller is not just a bug, it is a safety hazard. Pascal's type system catches these errors at compile time.

The embedded Pascal community is small but dedicated. Several open-source projects provide Pascal bindings for common embedded platforms:

  • MBF (MicroBit Framework) — Pascal support for the BBC micro:bit educational board.
  • AVR-Pascal — Free Pascal targeting Atmel AVR microcontrollers (as used in Arduino boards).
  • STM32 support — Free Pascal's ARM backend targets STM32 microcontrollers, widely used in industrial and hobbyist embedded projects.

Government and Defense

Government agencies and defense contractors use Delphi for administrative applications, data processing tools, and support systems. The strong typing and native compilation align with security requirements (no runtime dependencies to audit, no garbage collector to cause timing issues). In several European countries, government IT systems built in Delphi during the 2000s continue to be maintained and extended.

Financial Services

Banks, insurance companies, and financial services firms use Delphi for back-office applications, trading tools, and client management systems. The reliability of compiled Pascal code — no runtime crashes from null reference exceptions in a type-safe language — makes it suitable for applications where downtime has financial consequences.

The Job Market in Detail

Let us be more specific about the job landscape for Pascal developers.

Salary data. Experienced Delphi developers in the United States typically earn between $90,000 and $140,000 per year, with senior architects and consultants earning more. In Europe, the range is EUR 60,000–100,000 depending on the country. These figures are comparable to Java or C# developer salaries, and sometimes higher — because the supply of Delphi developers is shrinking (retirements) while the demand (maintenance of existing systems) is relatively stable.

Geographic distribution. Delphi jobs are concentrated in countries with large legacy Delphi codebases: the United States, Germany, the Netherlands, Brazil, Australia, and the United Kingdom. Remote work has expanded the market significantly since 2020 — a Delphi developer in a lower-cost region can now work for a company in Western Europe or the US.

Freelance and consulting. Many experienced Pascal/Delphi developers work as independent consultants, hired to modernize legacy Delphi applications. A typical engagement involves adding REST API capabilities to a desktop application, migrating from BDE (Borland Database Engine) to FireDAC, or upgrading from Delphi 7 to Delphi 12. These projects can be lucrative because few developers have the specialized knowledge required.

The modernization opportunity. Perhaps the most significant career opportunity in the Pascal world is application modernization. Thousands of Delphi applications from the 1995–2010 era are still in production use. Their owners want to add web interfaces, mobile companions, cloud integration, and modern UI designs — without rewriting the entire application. Developers who can bridge Pascal and modern web technologies (REST, JSON, OAuth, cloud APIs) are in high demand.

Notable Software Built with Pascal/Delphi

Software Description Pascal Variant
Skype (original Windows client) Voice-over-IP application Delphi
Total Commander File manager, one of the most popular Windows utilities Delphi
HeidiSQL MySQL/PostgreSQL database management tool Delphi
GIMP (ScriptFu) Image editor (scripting engine) Free Pascal
Peazip File archiver and compression tool Free Pascal + Lazarus
Double Commander Cross-platform file manager Free Pascal + Lazarus
Beyond Compare File and folder comparison tool Delphi
FL Studio Digital audio workstation Delphi
Dev-C++ (original) C/C++ IDE Delphi
Castle Game Engine 3D/2D game engine Free Pascal

These are not toy projects. FL Studio is a professional music production tool used by Grammy-winning artists. Total Commander has millions of users. Skype served over 40 million concurrent users. Pascal built real software for real users at real scale.

📊 The Job Market A search for "Delphi developer" on major job boards typically returns between 500 and 2,000 open positions in the US and Europe combined. This is a fraction of the positions available for Java, Python, or JavaScript developers. But the supply of Delphi developers is also small — many are retiring, and few universities teach Delphi. This supply-demand imbalance means that experienced Delphi developers often command premium salaries, particularly in healthcare, finance, and government.

The typical Delphi job posting asks for: - 5+ years of Delphi/Object Pascal experience - Database experience (SQL Server, Oracle, or PostgreSQL) - Understanding of Windows application architecture - Experience with version control (Git) - Often: experience with web technologies (REST APIs, JSON) for modernization projects

The last point is significant: many Delphi positions involve modernizing existing applications — adding REST APIs, web frontends, mobile companions, or cloud integrations to established desktop software. This is exactly the kind of work that the skills from this textbook prepare you for. You know Pascal. You know databases. You know networking. You know how to build REST endpoints. You could walk into a Delphi modernization project and contribute immediately.

Pascal is not a career dead end. It is a career niche — and niches, in a competitive job market, can be more profitable than the mainstream.


39.8 Contributing to Free Pascal and Lazarus

Both Free Pascal and Lazarus are open-source projects that welcome contributions. Here is how to get involved:

Bug Reports

The single most valuable contribution a user can make is a clear, reproducible bug report. Free Pascal uses GitLab (https://gitlab.com/freepascal.org/fpc/source/-/issues) for issue tracking. Lazarus uses the Lazarus Bug Tracker (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues).

A good bug report includes: 1. The Free Pascal/Lazarus version and target platform. 2. A minimal program that reproduces the issue. 3. The expected behavior and the actual behavior. 4. The compiler output (error messages, warnings).

Documentation

The Free Pascal documentation is comprehensive but perpetually in need of updates. Contributing documentation — fixing typos, adding examples, clarifying explanations — is an excellent way to contribute without touching the compiler source code.

Patches

For code contributions: 1. Clone the Free Pascal or Lazarus repository from GitLab. 2. Make your change on a feature branch. 3. Write a test if applicable (Free Pascal has an extensive test suite). 4. Submit a merge request with a clear description of the change and its rationale.

The core team reviews all merge requests. Response times vary — the team is small and volunteer-based — but thoughtful, well-tested contributions are valued and appreciated.

Packages

Writing and publishing Lazarus packages is perhaps the easiest way to contribute to the ecosystem. If you build a useful component or library, package it for the OPM so others can install it with a single click.

The process for creating a Lazarus package:

  1. Create a package file (.lpk) using Package > New Package in Lazarus.
  2. Add your units to the package. Each unit should have a clear purpose and documented interface.
  3. Write an fpmake.pp or Makefile for command-line compilation (optional but recommended).
  4. Write documentation. At minimum: a README describing what the package does, how to install it, and a basic usage example.
  5. Submit to OPM. Fork the OPM packages repository, add your package metadata, and submit a merge request.

Answering Questions

One of the most impactful contributions requires no code at all: answering questions from other developers. The Lazarus forums, Stack Overflow, and Reddit r/pascal all have a steady stream of questions from beginners and intermediate developers. If you have worked through this textbook, you are qualified to answer many of them.

Answering questions has a multiplying effect. A clear answer to a common question is read not just by the person who asked, but by everyone who searches for the same question in the future. A well-written Stack Overflow answer about parameterized queries in SQLdb might be read by thousands of developers over the next decade.

Writing Tutorials and Blog Posts

The Pascal ecosystem has a documentation gap compared to larger ecosystems. Python has thousands of tutorials for every conceivable topic. Pascal has dozens. Every new tutorial closes this gap.

Topics that are particularly underserved in Pascal documentation: - Modern GUI patterns (MVVM, MVP) in Lazarus - REST API client implementation with fcl-web - Database migration strategies for SQLdb applications - Cross-platform deployment best practices - Integration with cloud services (AWS, Azure, GCP) - Testing strategies and CI/CD for Pascal projects

If you have expertise in any of these areas, a blog post or tutorial would be a genuine contribution to the community.

Building the Ecosystem

The Pascal ecosystem grows one contribution at a time. Every bug report makes the compiler more reliable. Every documentation improvement helps the next beginner. Every package fills a gap that someone else would otherwise have to fill themselves. The community's size is its challenge — there are fewer people to do the work — but also its advantage: individual contributions have outsized impact. A single well-maintained package can serve thousands of developers. A single clear tutorial can be the difference between a new developer staying with Pascal or giving up.

💡 Start Small Do not start by trying to add a new code generator to the compiler. Start by reporting a bug. Then fix a documentation issue. Then write a small patch. Each contribution builds your understanding of the codebase and your reputation in the community. The Free Pascal and Lazarus projects were built by people who started exactly this way.


39.9 Summary

The Pascal ecosystem is smaller than the ecosystems surrounding Python, JavaScript, or Java. It does not pretend otherwise. But it is remarkably complete for its size.

Free Pascal compiles to native code on more platforms than any other free compiler. Lazarus provides a professional IDE with a rich component palette, a package manager, and a visual form designer. Delphi offers a commercially supported alternative with additional frameworks for mobile development. The library ecosystem covers networking, databases, web development, game engines, cryptography, scientific computing, and industrial automation. The community — spread across forums, Discord, Reddit, and Stack Overflow — is knowledgeable, helpful, and deeply committed to the language's future.

PennyWise fits naturally into this ecosystem. It uses Free Pascal for compilation, Lazarus for the GUI, SQLDB for database access, and standard Free Pascal units for everything else. If we wanted to extend it, the ecosystem provides the tools: Brook Framework for a web companion, Castle Game Engine for gamifying budgets (a terrible idea, but technically possible), mORMot for enterprise-grade server deployment, or DCPcrypt for database encryption.

The ecosystem is not perfect. Package discovery is harder than in Python (no equivalent of PyPI's search and ranking system). Documentation quality varies widely between packages. Some packages are maintained by a single developer and may become unmaintained if that developer moves on. The OPM does not have the equivalent of npm's download statistics or PyPI's quality indicators. These are real limitations, and acknowledging them honestly is more productive than pretending they do not exist.

But the core — the compiler, the IDE, the standard library — is rock-solid, actively maintained, and continuously improving.

There is a deeper point here, one that transcends the question of which library solves which problem. The Pascal ecosystem exists because people care about it. Not because it is profitable (though some Delphi developers make very good livings). Not because it is trendy (it has not been trendy since the 1990s). Because people find value in a language that respects their intelligence, rewards their discipline, and produces software that works reliably for decades.

Florian Klaempfl started Free Pascal as a student project in 1993 because he wanted a free Pascal compiler. He is still maintaining it thirty-three years later. The Lazarus IDE has been actively developed since 1999. The community forums have been running since 2005. This is not the behavior of people working on a dead language. This is the behavior of people who have found something worth sustaining.

Whether you remain in the Pascal ecosystem or move to other languages, understanding what makes an ecosystem work — compilers, libraries, IDEs, communities, documentation, and the human commitment that sustains all of them — is knowledge that serves you everywhere. Free Pascal 3.2 added management operators, anonymous functions, and improved generics. Lazarus 3.0 improved the form designer, added HiDPI support, and enhanced macOS integration. The development pace is slower than a venture-funded startup's, but the stability is greater. The compiler that compiled your program today will compile it ten years from now with the same results. That is not a limitation. That is a promise.

Pascal is alive. Not just surviving — thriving. Not loudly, but steadily, in the way that well-engineered things tend to do.