> "I have often felt that programming is an art form, whose real significance is only realized when based on the scientific foundations of computing."
Learning Objectives
- Trace Pascal's evolution from Wirth's 1970 design through UCSD Pascal, Turbo Pascal, Delphi, and Free Pascal
- Evaluate Niklaus Wirth's contributions to computer science beyond Pascal itself
- Identify Pascal's influence on modern languages including Java, C#, Ada, Swift, and Rust
- Assess the Turbo Pascal revolution's impact on the software industry
- Analyze Pascal's future directions including WebAssembly, mobile, embedded, and educational contexts
- Reflect on the complete forty-chapter journey and articulate what you have learned
In This Chapter
- 40.1 Niklaus Wirth's Legacy
- 40.2 The History of Pascal: 1970-2026
- 40.3 Pascal's Influence on Other Languages
- 40.4 The Turbo Pascal Revolution
- 40.5 Modern Object Pascal: A Living Language
- 40.6 Pascal's Future
- 40.7 What You Have Learned and Where You Can Go
- 40.8 Rosa's and Tomas's Next Steps
- 40.9 A Love Letter to Pascal
- 40.10 Summary
Chapter 40: Pascal's Legacy and Future: From Wirth to Modern Object Pascal and Beyond
"Simplicity is prerequisite for reliability." — Niklaus Wirth
"I have often felt that programming is an art form, whose real significance is only realized when based on the scientific foundations of computing." — Niklaus Wirth, Turing Award Lecture, 1984
This is the last chapter.
Not the last thing you will learn about programming — that will continue for the rest of your life. Not the last Pascal you will write — if this textbook has done its job, it is only the beginning. But it is the last page of the journey we started together forty chapters ago, when you opened this book and decided to learn a programming language that most of the world has written off as obsolete.
They were wrong, and you know it now. Not because Pascal dominates the job postings or the Hacker News headlines. It does not. But because you have spent forty chapters building real software — from a one-line "Hello, World" to a complete, cross-platform, database-backed, network-capable personal finance manager — and at every step, Pascal rewarded clarity, punished sloppiness, and taught you to think before you type.
This chapter tells the story of how that happened. It traces Pascal from Niklaus Wirth's original design in 1970 through the Turbo Pascal revolution, the Delphi golden age, the apparent decline, and the quiet renaissance. It examines what Pascal got right, what it influenced, and where it is going. And it ends where it should: with you, and with what you will do next.
40.1 Niklaus Wirth's Legacy
Niklaus Emil Wirth (1934-2024) was born in Winterthur, Switzerland, and spent most of his career at ETH Zurich. He received the Turing Award in 1984. These are the biographical facts, and they are less interesting than the truth they contain: that one man, working at a single university, shaped the way two generations of programmers learned to think.
Wirth did not create just one programming language. He created a sequence of languages, each refining the ideas of its predecessor:
- Euler (1966) — An attempt to extend Algol 60 with greater generality. Wirth's first language, and by his own admission, an experiment that taught him what not to do.
- Algol W (1966) — A simplified, practical dialect of Algol 60. Wirth proposed it as the successor to Algol 60, but the Algol committee chose the far more complex Algol 68 instead. This rejection was a turning point — it convinced Wirth that the field was moving in the wrong direction, toward complexity instead of simplicity.
- Pascal (1970) — The language designed to teach programming as a systematic discipline. Clean, minimal, strongly typed, compiled. The language that changed computer science education.
- Modula-2 (1978) — Pascal's successor, adding modules (separate compilation units) and coroutines. Modula-2 solved Pascal's biggest practical limitation — the inability to organize large programs into separately compiled units — while preserving Pascal's clarity.
- Oberon (1987) — The most radical expression of Wirth's philosophy. Oberon was not just a language but an entire operating system, designed from scratch to be as simple as possible. The Oberon language had fewer features than Pascal. Wirth believed this was progress.
- Oberon-2 (1991) — A modest extension of Oberon adding type-bound procedures (essentially methods), making object-oriented programming cleaner.
Each language was simpler, not more complex, than its predecessor. Each removed features that Wirth considered unnecessary. This trajectory was the opposite of what the rest of the field was doing — adding features to C to get C++, adding features to C++ to get Java, adding features to Java to get... more Java. Wirth believed that a programming language should have the minimum number of features necessary to express programs clearly and efficiently. He called this the "Project Oberon" principle, and he lived it.
📜 Historical Context: Wirth's Design Methodology Wirth's approach to language design was architectural, not political. He did not design by committee or by market demand. He designed by asking: "What is the simplest set of features that produces clear, correct, efficient programs?" And then he tested his answer by writing real software — compilers, operating systems, hardware description tools — in his own language. If the language was not good enough to build its own compiler, it was not good enough.
Beyond programming languages, Wirth made major contributions to:
- Compiler construction. His textbook Compiler Construction and his technique of recursive descent parsing are still taught in compiler courses worldwide. The parsing technique you use when you write a procedure that calls itself to parse nested expressions? Wirth formalized that.
- Hardware design. He designed the Lilith workstation (1980) and later the Ceres workstation, both running the Oberon operating system. He believed that hardware and software should be designed together.
- Software engineering. His book Algorithms + Data Structures = Programs (1976) is one of the most cited works in computer science. Its title became a maxim. It is the fifth theme of this textbook.
Niklaus Wirth passed away on January 1, 2024, at the age of 89. He had been retired from ETH Zurich since 1999 but continued to work on Oberon until the end. The computing world he left behind is noisier, more complex, and more powerful than the one he entered. But the principles he championed — simplicity, clarity, discipline, and the primacy of thought over code — remain as relevant as they were in 1970. Perhaps more so.
💡 The Wirth Paradox Wirth spent his career making things simpler, in a field that rewards making things more complex. He was right, and the field knows it, but the field does not always act on what it knows. Every programmer who has struggled with a bloated framework, a cryptic error message, or a dependency tree with 1,400 packages knows — in their bones — that Wirth was right. Simplicity is prerequisite for reliability. We just keep forgetting.
40.2 The History of Pascal: 1970-2026
The Academic Era (1970-1983)
Wirth published the Pascal specification in 1970 and the first compiler — targeting the CDC 6000 mainframe at ETH Zurich — in 1971. The language spread rapidly through universities, carried by a combination of technical merit and perfect timing.
1975: UCSD Pascal. Kenneth Bowles and his team at the University of California, San Diego, created UCSD Pascal — a Pascal system that compiled to "p-code" (pseudo-code) for a virtual machine, making it portable across hardware platforms. UCSD Pascal ran on Apple II, PDP-11, Z80, and other microcomputers. It was the first widely available Pascal for personal computers and introduced the concept of a standardized runtime environment — a precursor to Java's JVM, twenty years early.
1977: Apple Pascal. Apple licensed UCSD Pascal and made it one of the primary development languages for the Apple II and later the Apple III. Pascal was the language of choice for serious Apple software development throughout the early 1980s.
1978: ISO 7185 Pascal Standard. The International Organization for Standardization published the Pascal standard, formalizing the language. The standard was important for portability but also controversial — it codified limitations (like the inability to pass variable-length arrays to procedures) that many implementations had already worked around.
1982: AP Computer Science. The College Board chose Pascal as the language for the AP Computer Science exam, cementing its role as the standard teaching language in the United States. Pascal would remain the AP language until 1999, when it was replaced by C++.
The Turbo Pascal Revolution (1983-1995)
In 1983, everything changed.
Borland International, a small software company in Scotts Valley, California, released Turbo Pascal 1.0 for the IBM PC. The product cost $49.95 — a fraction of what other Pascal compilers charged. It included an integrated editor, compiled blazingly fast (a few seconds for typical programs), and produced efficient machine code. It was, by any measure, a revelation.
The person behind Turbo Pascal was Anders Hejlsberg, a Danish programmer who had written the compiler as a personal project. Borland's Philippe Kahn recognized its potential and offered Hejlsberg a position. The rest is history.
Turbo Pascal went through seven major versions, each adding features that pushed Pascal from a teaching language into a professional development tool:
| Version | Year | Key Additions |
|---|---|---|
| 1.0 | 1983 | Integrated editor, CP/M and DOS |
| 3.0 | 1985 | Overlay support, .COM and .EXE output |
| 4.0 | 1987 | Units (separate compilation), interface/implementation sections |
| 5.0 | 1988 | Integrated debugger, overlay manager |
| 5.5 | 1989 | Object-oriented programming (basic OOP) |
| 6.0 | 1990 | Turbo Vision (TUI framework), assembly inlining |
| 7.0 | 1992 | DOS protected mode (up to 16 MB memory), DPMI support |
Turbo Pascal 4.0's introduction of units was particularly significant. Wirth's original Pascal had no mechanism for separate compilation — every program was a single file. This was acceptable for teaching but impractical for large software projects. Borland's unit system (later adopted by Free Pascal and standardized in Delphi) solved this problem cleanly, with interface and implementation sections that provided both separate compilation and information hiding.
By the early 1990s, Turbo Pascal had sold millions of copies and had made Pascal the most popular language for DOS development. Borland's revenue from Pascal products funded the development of what came next.
📊 The Turbo Pascal Effect Turbo Pascal's $49.95 price point was not just a marketing decision — it was a philosophical one. Kahn believed that programming tools should be accessible to everyone, not just corporations with large budgets. This democratization of development tools was radical in 1983 and anticipated the open-source movement by a decade. When Free Pascal was created in 1993, it carried the same spirit: everyone should be able to program in Pascal, regardless of budget.
The Delphi Golden Age (1995-2005)
In 1995, Borland released Delphi: a 32-bit visual development environment for Windows, built on Object Pascal. Delphi combined Turbo Pascal's fast compilation with a visual form designer, a component-based architecture, and native Win32 compilation. It was, in the words of many developers who used it, the best development tool ever created.
Delphi's innovations were numerous:
-
Visual Component Library (VCL). A clean, well-designed component framework where every control — from buttons to database grids — was an object with properties, methods, and events. Drop a component on a form, set its properties in the Object Inspector, and write event handlers in code. This was RAD (Rapid Application Development) before the term was widely used.
-
Native compilation. Unlike Visual Basic (which was interpreted, then later p-code compiled), Delphi produced true native Win32 executables. Delphi applications started fast, ran fast, and were small.
-
Two-way tools. Changes in the form designer were immediately reflected in code, and changes in code were immediately reflected in the designer. This bidirectional synchronization was groundbreaking.
-
Database connectivity. Delphi's BDE (Borland Database Engine) and later dbExpress provided easy connectivity to databases — a critical feature for the business applications that drove Windows development in the 1990s.
Between 1995 and 2005, Delphi was the tool of choice for Windows desktop development. Thousands of commercial applications were built with it. The Delphi developer community was enormous and passionate. Borland's annual conference, BorCon, drew thousands of attendees.
The Delphi Component Ecosystem
It is worth pausing to appreciate what Delphi created in the component ecosystem. During the golden age, a thriving market of third-party component vendors emerged:
- DevExpress developed advanced grid, chart, and reporting components that turned Delphi into an enterprise reporting platform.
- TMS Software provided over 600 components for web, cloud, grid, planning, and cryptography.
- Raize Software (later Konopka Signature VCL Controls) provided polished, professional UI components.
- FastReport became the standard report generation toolkit for Delphi applications.
- RemObjects developed networking and remoting components for distributed applications.
This ecosystem of paid and free components meant that a Delphi developer could build a sophisticated enterprise application by assembling components — drop a grid on a form, connect it to a database, add a report generator, deploy to production. The productivity was extraordinary. A single Delphi developer could build in a week what a team of C++ developers might spend a month on.
Many of these components are still available and actively maintained. Some have been ported to Lazarus (or have Lazarus equivalents), further enriching the Free Pascal ecosystem.
The Decline and Transition (2005-2015)
Several factors combined to reduce Pascal's visibility in the mid-2000s:
-
The web transition. As software moved from desktop to web, the languages of the web — JavaScript, PHP, Python, Ruby — gained prominence. Delphi's strength was desktop development, and the market was shifting.
-
Corporate turmoil at Borland. Borland lost focus, diversified into unrelated products, and eventually sold its development tools division. The ownership changes (Borland to CodeGear to Embarcadero to Idera) created uncertainty and eroded developer trust.
-
Java and C# rose. Java's "write once, run anywhere" promise and Microsoft's aggressive promotion of C# (designed by Anders Hejlsberg, who had left Borland for Microsoft in 1996) attracted developers away from Delphi.
-
The education shift. Universities replaced Pascal with Java and Python in their introductory courses. By 2010, fewer than 5% of US universities used Pascal for CS1.
-
The "Pascal is dead" meme. Once enough people said it, it became self-reinforcing. Developers avoided Pascal because it was "dead," and its perceived death was cited as evidence that it should be avoided.
The Renaissance (2015-Present)
But Pascal did not die. It evolved.
Free Pascal matured. By 2015, Free Pascal 3.0 included generics, operator overloading, and Delphi-compatible modes. It compiled to more platforms than ever. The compiler was fast, the output was efficient, and the language was modern.
Lazarus reached parity. Lazarus 1.4 (2015) and subsequent releases brought the IDE to professional quality. The form designer, debugger, and package manager matched commercial IDE standards. Cross-platform compilation worked reliably.
Delphi reinvented itself. Under Embarcadero, Delphi added FireMonkey for cross-platform mobile development, Linux support, and modern language features. Delphi 10 Seattle (2015) through Delphi 12 Athens (2024) represented a sustained effort to modernize.
The community consolidated. The Free Pascal forums, the Lazarus wiki, and online communities like r/pascal and various Discord servers created a vibrant (if smaller) ecosystem. Conferences like PascalCon provided gathering points.
The result: in 2026, Pascal is a living language with two actively maintained compilers (Free Pascal and Delphi), a professional IDE (Lazarus), a rich library ecosystem, and a dedicated community. It is not the most popular language. It was never going to be again. But it is alive, productive, and — for the right projects — an excellent choice.
The "Pascal is Dead" Myth
It is worth addressing this myth directly, because you will encounter it. Every time you mention that you know Pascal, someone will tell you that Pascal is dead. Here is how to respond:
"Pascal is dead" means "Pascal is not popular." This is true. Pascal is not in the top ten of the TIOBE index. It is not the language of startups, of AI, or of web development. But popularity is not vitality. COBOL is not popular, and yet it processes an estimated 95% of ATM transactions and 80% of in-person financial transactions worldwide. Fortran is not popular, and yet it runs the world's climate models and weather forecasts. Popularity measures attention. Vitality measures use.
"No one uses Pascal anymore" is factually false. FL Studio, used by millions of music producers, is built in Delphi. Total Commander has been maintained in Delphi for over thirty years. PeaZip has over ninety million downloads. Double Commander, HeidiSQL, and hundreds of other applications are built with Pascal. Thousands of companies run mission-critical systems written in Delphi. People use Pascal every day — they just do not tweet about it.
"You can't get a job with Pascal" is misleading. There are fewer Pascal jobs than Python or Java jobs. But there are also fewer Pascal developers, and the ones who exist are aging. The supply-demand ratio for experienced Delphi developers is often more favorable than for generic Python developers, where thousands of applicants compete for each position.
The honest assessment: Pascal is a niche language with a loyal, productive community and a track record of building durable software. It is not the right choice for every project. It is an excellent choice for some projects, and an outstanding choice for learning to program. Both of these things can be true simultaneously.
40.3 Pascal's Influence on Other Languages
Pascal's influence extends far beyond programs written in Pascal. The language's ideas — structured programming, strong typing, readable syntax, the compilation model — have shaped nearly every major language developed since 1970.
Ada (1983)
The US Department of Defense designed Ada to be a reliable, maintainable language for mission-critical systems. Ada's designers explicitly acknowledged Pascal as an influence: Ada's strong typing, block structure, and emphasis on readability are direct descendants of Pascal's design. Ada went further with concurrency, real-time constraints, and formal verification, but the foundation is Pascalian.
Java (1995)
James Gosling designed Java with several Pascal-inspired features: strong static typing, explicit class declarations, separate compilation units (packages, analogous to Pascal units), and the philosophy that the compiler should catch errors before runtime. Java's interface keyword serves the same purpose as Pascal's (and Delphi's) interface declarations. The connection is indirect — Java's immediate ancestors are C and C++ — but Pascal's influence on the discipline of language design pervades Java's approach.
C# (2000)
This one is direct. Anders Hejlsberg — the creator of Turbo Pascal and Delphi — designed C# for Microsoft. The fingerprints of Pascal are unmistakable: C#'s properties with get and set accessors mirror Delphi's property system. C#'s delegate type is a refinement of Delphi's method pointer. C#'s emphasis on type safety, its component-oriented design, and its integration with a visual form designer (Windows Forms, WPF) all trace back to Delphi, which traces back to Pascal.
When you write C#, you are writing in a language designed by the same person who designed Turbo Pascal, shaped by the same philosophy that shaped Delphi, descended from the same ideas that Niklaus Wirth formalized in 1970.
Swift (2014)
Apple's Swift language, designed by Chris Lattner, incorporates several Pascal-like features: explicit type declarations (with type inference as an option, not a requirement), strong typing with no implicit conversions, let for constants (similar to Pascal's const), and the func keyword for function declarations (where Pascal uses function and procedure). Swift's emphasis on safety — optionals, value types, protocol-oriented programming — echoes Pascal's philosophy that the language should prevent errors, not just detect them.
Rust (2015)
Rust's emphasis on memory safety without garbage collection resonates deeply with Pascal's approach. Both languages believe that the programmer should manage memory explicitly (or have the compiler help), not rely on a garbage collector to clean up. Rust's algebraic types and pattern matching go beyond what Pascal offers, but the underlying principle — the compiler should enforce correctness — is the same principle Wirth articulated in 1970.
⚠️ A Nuance To be clear: none of these languages are "Pascal in disguise." Each has its own design goals, its own innovations, and its own identity. But they exist in a world where structured programming, strong typing, and readable syntax are expected features of a serious language. Before Pascal, those expectations did not exist. Pascal helped create them.
40.4 The Turbo Pascal Revolution
The story of Turbo Pascal deserves its own section because it represents one of the most consequential moments in the history of personal computing.
Before Turbo Pascal, programming on a personal computer was an exercise in patience. You wrote your code in a text editor. You saved it. You exited the editor. You ran the compiler. You waited. If the compiler found errors, you wrote down the error messages, re-entered the editor, found the lines, fixed the errors, saved, exited, compiled again. Each cycle took minutes.
Turbo Pascal compressed the cycle to seconds. The integrated editor and compiler meant you never left the environment. Compilation was nearly instantaneous — a small program compiled in under a second, a large program in a few seconds. The error cursor jumped directly to the line with the problem. Fix, compile, run — all without leaving the screen.
This speed changed the way people programmed. Instead of planning everything on paper and then typing it in carefully (because each compilation was expensive), developers could experiment. Try something. Compile. See if it works. Try something else. This iterative, experimental approach to programming — so natural today that we take it for granted — was enabled by Turbo Pascal.
Anders Hejlsberg's compiler was also astonishingly small. Turbo Pascal 1.0 fit on a single 160K floppy disk: the compiler, the editor, the runtime library, and the documentation. The entire development environment occupied less memory than a single JPEG image does today. This was not just an engineering achievement — it was a philosophical statement. Software does not have to be large to be powerful. A well-written Pascal compiler, by a single brilliant programmer, could fit in 33 kilobytes of code.
Hejlsberg achieved this by writing the compiler in assembly language (the irony: the tool for writing high-level programs was itself written in the lowest-level language) and by using a single-pass compilation strategy. Most compilers make multiple passes over the source code; Turbo Pascal made one, reading each line of code once and generating machine code immediately. This single-pass architecture placed some restrictions on the language (forward declarations were necessary because the compiler had not yet seen later declarations), but the speed gain was transformative.
The business impact was equally significant. Borland's Philippe Kahn priced Turbo Pascal at $49.95 and advertised it in BYTE magazine with a full-page ad. At the time, other Pascal compilers cost $300-$500. The result was explosive: Turbo Pascal sold 250,000 copies in its first year, an unprecedented number for a programming tool. By the end of the 1980s, millions of copies had been sold, making it the best-selling programming language product in history.
The Turbo Pascal Generation
An entire generation of programmers learned to code with Turbo Pascal. Many of them went on to shape the software industry:
- Anders Hejlsberg himself went from Turbo Pascal to Delphi to C#, carrying Pascal's design philosophy into one of the world's most popular languages.
- John Carmack, while primarily known for C programming, used Turbo Pascal for early game prototyping before building id Software and creating Doom and Quake.
- Many Silicon Valley engineers in their 40s and 50s today learned programming with Turbo Pascal on their first IBM PCs. The discipline they learned — strong typing, structured programming, explicit control flow — shaped their approach to software regardless of what languages they later used.
The Turbo Pascal generation is now in leadership positions across the software industry. They hire developers, set technical standards, and make architectural decisions. Their intuitions about what makes software good — clarity, efficiency, reliability — were formed by a Pascal compiler that fit on a floppy disk.
📜 Historical Artifact: The BYTE Magazine Ad Borland's original BYTE magazine advertisement for Turbo Pascal is a masterpiece of technical marketing. It listed the compiler's features (integrated editor, compile speed, runtime library) alongside its $49.95 price and Borland's money-back guarantee. The ad ran in November 1983 and generated so many mail orders that Borland could not fill them fast enough. If you can find a scan of this advertisement online, it is worth reading — it captures the excitement of a moment when professional programming tools became accessible to everyone.
40.5 Modern Object Pascal: A Living Language
If you have followed this textbook from Chapter 1, you already know that Pascal is not the language of 1970. Modern Object Pascal — as implemented by Free Pascal 3.2+ and Delphi 12 — is a comprehensive, feature-rich language that compares favorably with any modern language in expressiveness.
Features added to Object Pascal since 2010 include:
Generics — Type-parameterized classes, records, and functions that enable code reuse without sacrificing type safety. We used generics extensively in Chapters 20 and 38.
Anonymous functions and closures — Functions defined inline and passed as parameters, capturing variables from the enclosing scope. Essential for modern API design and callback patterns.
Advanced records — Records with methods, constructors, operator overloading, and class operators. Records remain value types (stack-allocated, copied on assignment) but gain the expressiveness previously limited to classes.
Management operators — Initialize, Finalize, Copy, and AddRef operators for records, enabling automatic resource management (RAII) without classes.
Type helpers — The ability to add methods to existing types (including primitive types) without inheritance or modification:
type
TIntegerHelper = type helper for Integer
function IsPrime: Boolean;
function Factorial: Int64;
end;
begin
if 17.IsPrime then
WriteLn('17 is prime');
WriteLn('10! = ', 10.Factorial);
end.
Inline variables (Delphi; experimental in FPC trunk) — Declare variables at the point of first use rather than in a var block:
begin
var Sum: Integer := 0;
for var I := 1 to 100 do
Sum := Sum + I;
WriteLn(Sum);
end.
Nullable types — Nullable value types that can represent "no value" without using pointers.
Multiline string literals — Strings that span multiple lines without concatenation, making it easier to embed SQL queries, JSON templates, or formatted text in code.
For..in loops — Iteration over collections without index variables:
var
Names: array of String;
Name: String;
begin
Names := ['Alice', 'Bob', 'Charlie'];
for Name in Names do
WriteLn(Name);
end.
How Modern Is "Modern"?
A fair question: how does modern Object Pascal compare to the most talked-about languages of 2026?
| Feature | Pascal (FPC 3.2+) | Rust | Go | Swift | Kotlin |
|---|---|---|---|---|---|
| Strong static typing | Yes | Yes | Yes | Yes | Yes |
| Generics | Yes | Yes | Yes (since 1.18) | Yes | Yes |
| Closures / lambdas | Yes | Yes | Yes | Yes | Yes |
| Null safety | Partial (nullable types) | Yes (Option |
No (nil panics) | Yes (optionals) | Yes (null safety) |
| Memory safety | Manual + managed operators | Ownership model | GC | ARC | GC (JVM) |
| Concurrency | Threads + synchronization | async/await + ownership | Goroutines | async/await + actors | Coroutines |
| Native compilation | Yes | Yes | Yes | Yes | JVM/Native |
| Cross-platform GUI | LCL (mature) | Limited | Limited | SwiftUI (Apple only) | Compose (Kotlin) |
Pascal holds its own. It does not have Rust's ownership model or Go's goroutines, but it has mature generics, a professional cross-platform GUI framework, and thirty years of production-tested stability. For desktop application development — the domain PennyWise occupies — Pascal's combination of native compilation, mature GUI, and database connectivity is hard to beat.
The language is not frozen. It is evolving — carefully, with Wirth's principle of simplicity as a guiding constraint, but evolving nonetheless. Each new feature is evaluated against the question: does this make programs clearer, or does it make them more complex? Features that pass this test are added. Features that do not are rejected or deferred.
40.6 Pascal's Future
Where is Pascal going? We cannot predict the future, but we can identify the directions in which the language and its ecosystem are moving.
WebAssembly
Free Pascal's experimental WebAssembly (Wasm) backend compiles Pascal directly to WebAssembly bytecode, enabling Pascal programs to run in web browsers. This is potentially transformative: it means that Pascal applications could be deployed on the web without rewriting them in JavaScript or TypeScript.
The Wasm backend is not yet production-ready (as of 2026), but active development continues. Additionally, the pas2js transpiler — which converts Pascal source code to JavaScript — provides a mature alternative for web deployment today. Several community members have built web applications in Pascal using pas2js, and the tool supports a significant subset of the Object Pascal language.
Mobile Development
LAMW (Lazarus Android Module Wizard) enables building Android applications with Free Pascal and Lazarus. LAMW provides components for Android UI elements, sensors, permissions, and services. The resulting applications are native (compiled to ARM machine code), not interpreted.
Delphi's FireMonkey framework provides more mature mobile support, targeting both Android and iOS from a single codebase. For developers willing to use the commercial tool, Delphi remains the stronger choice for mobile Pascal development.
Embedded Systems
Free Pascal's support for ARM, AVR, and other embedded architectures is growing. The compiler can target bare-metal environments (no operating system), making it suitable for programming microcontrollers. Pascal's strong typing is particularly valuable in embedded contexts, where a type error can mean physical damage to hardware or danger to users.
The Embarcadero team has also expressed interest in embedded targets, suggesting that commercial Delphi may eventually support microcontroller programming.
Education
There are signs of a Pascal education revival. As educators recognize the limitations of teaching with Python (students learn to produce programs without understanding computation) and the difficulty of teaching with C++ or Java (too much ceremony, too many pitfalls), some are returning to Pascal or adopting it for the first time.
Free Pascal and Lazarus provide a free, cross-platform, batteries-included development environment that is ideal for education. The language's readability, strong typing, and compile-time error checking make it pedagogically superior for teaching programming fundamentals. This textbook is part of that revival.
The AI Era
In an era of AI-assisted coding, Pascal's strengths become even more valuable. AI tools can generate code in any language, but they cannot generate understanding. A student who learns to program with AI-generated Python code may be able to produce working programs but will not develop the mental models of types, memory, and control flow that enable real problem-solving. Pascal, with its insistence on explicit declarations and its refusal to do things implicitly, forces the student to build those mental models — even when AI is doing the typing.
The programmers who thrive in the AI era will not be the ones who are best at prompting AI to generate code. They will be the ones who understand what the code does, why it works, and how to fix it when it does not. Pascal teaches that understanding.
PennyWise's Future
Where could PennyWise go from here? The application we built in Chapter 38 is a solid desktop application. But the ecosystem provides paths for every direction:
PennyWise Web — Using pas2js or the Brook Framework, PennyWise's business logic could be deployed as a web application. The FinanceCore unit, which has no dependencies on the GUI or database, could be transpiled to JavaScript with minimal changes. The database layer would be replaced by REST API calls. The result: a PennyWise that runs in any web browser.
PennyWise Mobile — Using LAMW (for Android) or Delphi's FireMonkey (for Android and iOS), PennyWise could become a mobile app. The same FinanceCore logic applies — expenses, income, budgets, and reports work the same way on a phone as on a desktop. The UI would be redesigned for touch interaction, but the domain model remains unchanged.
PennyWise Embedded — A simpler version of PennyWise — perhaps just expense tracking with a small LCD display and a keypad — could run on an ARM microcontroller. This sounds exotic, but dedicated hardware expense trackers exist as commercial products. Free Pascal could target such hardware directly.
PennyWise AI — A machine learning module could automatically categorize imported bank transactions based on description patterns. Free Pascal can interface with Python via process pipes, or you could implement a simple Bayesian classifier directly in Pascal — the math is straightforward, and you learned all the necessary data structures in Part IV.
Each of these directions builds on what you already know. The skills are transferable. The architecture is extensible. The language supports it. This is what we mean when we say that Pascal teaches you to program, not just to write Pascal: the PennyWise you built can evolve into software you have not yet imagined, using tools you have not yet learned, and the foundations will hold.
The Language Features That Matter Most Going Forward
If we look at the trajectory of programming language design over the past decade, several trends emerge — and Pascal is well-positioned for most of them:
Memory safety without garbage collection. Rust popularized the idea that memory safety can be enforced by the compiler without a garbage collector. Pascal has always been in this space — manual memory management with strong typing that prevents many classes of memory errors. Free Pascal's management operators (Initialize/Finalize) bring RAII to the language, moving further in Rust's direction without abandoning Pascal's simplicity.
Native compilation for performance and deployment. As the industry moves away from heavy runtimes (Java/.NET/Node.js), native compilation is gaining renewed appreciation. Go, Rust, Swift, and Zig all compile to native code. Pascal has done this since 1970. The deployment model — a single binary, no runtime dependencies — is exactly what modern DevOps practices prefer.
Cross-platform from a single codebase. Flutter, React Native, and .NET MAUI all aim to build once and deploy everywhere. Lazarus has been doing this for over two decades, with the LCL abstracting platform differences at the widget level. The approach is mature and battle-tested.
Simplicity and readability. Go explicitly rejects complexity in favor of simplicity and readability — a philosophy directly descended from Wirth. Python's popularity is partly due to its readability. The industry is rediscovering what Wirth knew in 1970: readable code is maintainable code, and maintainable code is valuable code.
Pascal anticipated many of these trends by decades. It did not get credit for the anticipation — it is not fashionable to cite Pascal as an influence — but the ideas are there, and they are proving more durable than the hype cycles that surround them.
40.7 What You Have Learned and Where You Can Go
Let us take stock.
In forty chapters, you have learned:
Part I (Chapters 1-8): Foundations. Variables, types, expressions, input/output, conditionals, loops, procedures, functions, scope, and parameters. You learned to decompose problems into steps, to think about types before you think about code, and to write programs that are clear enough for another human to read.
Part II (Chapters 9-15): Data Structures. Arrays, strings, records, sets, enumerations, files, pointers, and linked lists. You learned that the way you organize data determines the way you can process it — Wirth's fundamental insight.
Part III (Chapters 16-21): Object-Oriented Pascal. Classes, inheritance, polymorphism, interfaces, abstract classes, generics, and operator overloading. You learned that objects are not just data containers — they are models of the world, and a good model makes everything easier.
Part IV (Chapters 22-26): Algorithms. Recursion, sorting, searching, trees, graphs, dynamic programming, and performance analysis. You learned that there are many ways to solve a problem, that some ways are profoundly better than others, and that the analysis of algorithms is as important as the algorithms themselves.
Part V (Chapters 27-32): GUI Development. Forms, controls, events, menus, dialogs, charts, databases, and cross-platform deployment. You learned that software has users, that users have needs, and that a beautiful algorithm hidden behind an unusable interface is worthless.
Part VI (Chapters 33-37): Systems Programming. Units, packages, file formats, serialization, networking, multithreading, and operating system interfaces. You learned that real software exists in a world of files, networks, threads, and platforms, and that handling this complexity cleanly is an engineering discipline.
Part VII (Chapters 38-40): Capstone and Ecosystem. You assembled everything into PennyWise 2.0, surveyed the Pascal ecosystem, and traced the language's history and future.
This is a complete programming education. Not a complete computer science education — that would require courses in theory of computation, operating systems, compilers, databases, networks, and artificial intelligence. But a complete programming education: the ability to design, implement, test, and deploy software that solves real problems.
The Skills That Transfer
When you learn your next language — and you will — you will discover that approximately 80% of what you know transfers directly. The specific syntax changes (begin..end becomes {..}, := becomes =, WriteLn becomes print or console.log), but the concepts remain:
| Concept from Pascal | Transfers to... |
|---|---|
| Strong typing, explicit declarations | TypeScript, Rust, Go, Swift, Kotlin |
| Procedures and functions with clear signatures | Every language — functions are universal |
| Records and classes | Structs in Go/Rust, classes in Python/Java/C# |
| Interfaces and polymorphism | Java interfaces, Go interfaces, Rust traits, C# interfaces |
| Generics | Java, C#, Rust, TypeScript, Swift, Go |
| Manual memory management (New/Dispose) | C, C++, Rust (ownership model) |
| Unit-based modular design | Modules in Rust/Go/Python, packages in Java, namespaces in C# |
| Exception handling (try..except..finally) | Java, Python, C#, JavaScript, Kotlin |
| Database access (SQLDB) | Every language has database connectors; the SQL is the same |
| Event-driven GUI programming | Every GUI framework — React, WPF, SwiftUI, GTK |
| Multithreading with synchronization | Java threads, Python threading, Rust async, Go goroutines |
The 20% that does not transfer is Pascal-specific syntax and idioms — the exact keywords, the operator symbols, the unit file structure. These are trivial to relearn. The 80% that transfers — the mental models of types, scope, control flow, abstraction, modularity, and testing — is the education that lasts.
💡 The Transfer Test Here is how to know if your programming education was effective: when you open a program written in a language you have never seen before, can you read it? Can you follow the logic? Can you spot the bug? If you learned to program in Pascal — with its explicit types, clear control flow, and structured decomposition — the answer is almost certainly yes. You may not know the syntax, but you know the patterns. And patterns are what matter.
40.8 Rosa's and Tomas's Next Steps
Rosa Martinelli is sitting in a cafe in Turin, her laptop open, PennyWise running. She is not using it right now — she is staring at a different project, one she started last week. A client asked if she could build a portfolio website. "You know programming now, right?" the client said. "Can you make me a website?"
Rosa said yes before she realized she did not know web development.
But she knows programming. She knows what a variable is, what a function does, how to decompose a problem, how to structure data, how to design an interface. She has been learning HTML and CSS for three days, and she is surprised by how easy they are — they are just markup, not programming. She will start JavaScript next week, and she already knows, from Chapter 40, that JavaScript has a completely different type system than Pascal. Dynamic. Permissive. Dangerous in ways that Pascal is not.
She will be fine. She will write JavaScript the way she writes Pascal: declaring her intentions clearly, validating her inputs, handling her errors. Her JavaScript will be better than average because she learned to program in a language that did not let her be sloppy. The discipline transfers. It always does.
Tomas Vieira is in his university library, reading about data structures. Not for this textbook — he finished it a month ago. For his algorithms course, which uses Python. He is the only student in the class who has implemented a linked list from scratch using pointers. The other students learned about linked lists from Python's collections.deque. They know the API. Tomas knows the implementation.
His professor noticed. "You seem to understand memory layout in a way that your classmates don't," she said after class. "What language did you learn first?"
"Pascal," Tomas said.
The professor smiled. "That explains it."
Tomas is considering a career in systems programming. He has started learning Rust, and he is delighted to find that Rust's ownership model — which his classmates find confusing and alien — makes perfect sense to him. He managed memory explicitly in Pascal. He passed pointers to functions and worried about dangling references. He knows what "ownership" means because he has lived it. Rust formalizes what Pascal taught him informally, and the transition is smooth.
Rosa and Tomas will go different directions. Rosa toward web development and design tools. Tomas toward systems programming and performance engineering. They will use different languages for different projects. They will learn new frameworks, new paradigms, new tools. They will forget some of what they learned in this textbook and rediscover other parts of it at surprising moments.
But they will both carry something that does not fade: the understanding that a program is a model of thought, and that clarity of thought produces clarity of code. Pascal gave them that. It will stay with them regardless of what language they use.
40.9 A Love Letter to Pascal
We should be honest: this textbook has been, from the first page, an argument. An argument that Pascal is the best language for learning to program. An argument that simplicity is strength, that discipline enables creativity, that the compiler is your friend, and that a language designed for teaching produces better programmers than a language designed for rapid prototyping.
We have made this argument with code, with examples, with history, and with evidence. We have not hidden Pascal's limitations — it is not the most popular language, it does not have the largest library ecosystem, and it will not get you hired at a San Francisco startup. We have been honest about these things because you deserve honesty.
But honesty also compels us to say what we feel, not just what we know. So here it is:
Pascal is beautiful.
Not in the way that a painting is beautiful, or the way that a mathematical proof is beautiful (though it has something of both). Pascal is beautiful in the way that a well-made tool is beautiful. A hand plane with a sharp blade, a solid body, and a comfortable grip. A tool that does exactly what it was designed to do, no more and no less, and does it so well that using it is a pleasure.
program Fibonacci;
var
N, I: Integer;
A, B, Temp: Int64;
begin
Write('How many terms? ');
ReadLn(N);
A := 0;
B := 1;
for I := 1 to N do
begin
WriteLn(A);
Temp := A + B;
A := B;
B := Temp;
end;
end.
Look at this program. It is complete. It is correct. It is clear. Every line does one thing. Every variable has a declared type. The control flow is visible — no hidden branches, no implicit conversions, no surprises. You can read it aloud and someone who has never seen code will understand most of it. "Program Fibonacci. Variables N and I are integers. A, B, and Temp are 64-bit integers. Begin. Write 'How many terms?' Read N. A becomes zero, B becomes one. For I from one to N, begin: write A, compute the next term, shift the values. End. End."
This is what Wirth wanted. This is what Pascal gives. Not magic — clarity. Not power through abstraction — power through understanding.
We know that clarity is not fashionable. We know that the industry rewards complexity, that job postings ask for expertise in frameworks with three-letter acronyms, that conferences celebrate the latest abstraction layer. We know that saying "I program in Pascal" at a software meetup gets the same reaction as saying "I drive a manual transmission" at a Tesla owners' group.
We do not care. We drive a manual transmission because we enjoy understanding how the machine works, and we program in Pascal because we enjoy understanding how the program works. The understanding is the point. It was always the point.
There is a kind of programmer who values understanding over productivity, who would rather write fifty lines of clear Pascal than ten lines of cryptic Python, who reads error messages as the compiler's attempt to help rather than as obstacles to be circumvented. This programmer is not better or worse than others. But they are different. They have a relationship with their code that is more intimate, more intentional, more aware of what is happening beneath the surface.
Pascal creates that kind of programmer. Not because it is magic — because it is honest. It does not hide complexity. It does not pretend that types do not matter. It does not let you accidentally create a variable with the wrong type or forget to free memory you allocated. It tells you, at compile time, when you have made a mistake. And in doing so, it teaches you to think about the mistakes before you make them.
This is Wirth's real legacy. Not a programming language. A way of thinking. A discipline that produces reliable software, clear communication, and programmers who understand their own code.
Pascal was designed by a man who believed that programming should be taught as a systematic discipline — not as a trade, not as a hobby, but as a discipline of thought. Forty chapters ago, you decided to learn that discipline. You have learned it. You can now take it anywhere.
The language you use next does not matter. The discipline stays.
40.10 Summary
Pascal was created in 1970 by Niklaus Wirth to teach programming as a systematic discipline. It spread through universities in the 1970s, was democratized by Turbo Pascal in the 1980s, was professionalized by Delphi in the 1990s, and was sustained by Free Pascal and Lazarus through the 2000s and beyond.
Along the way, it influenced nearly every major language designed since 1970. Ada inherited its strong typing. Java inherited its structured approach to object-oriented programming. C# was designed by the same person who designed Turbo Pascal and Delphi, and it shows. Swift and Rust carry Pascal's conviction that the compiler should enforce correctness.
Today, Pascal is a modern, feature-rich language with generics, anonymous functions, advanced records, management operators, and operator overloading. Free Pascal compiles to more platforms than any other free compiler. Lazarus provides a professional IDE with a visual form designer, debugger, and package manager. Delphi continues to evolve as a commercial offering with mobile and enterprise capabilities.
The language's future includes WebAssembly targets, mobile development, embedded systems programming, and an education revival driven by the recognition that permissive languages produce permissive programmers, and that the world needs the opposite.
You have spent forty chapters learning to think in Pascal. The syntax — begin and end, := and =, procedure and function — will fade from memory if you stop using it. But the thinking will not. The habit of declaring your types, validating your inputs, structuring your code, and testing your assumptions — that is permanent. That is what Pascal was designed to give you.
Niklaus Wirth believed that the quality of a language shapes the quality of thought of the people who use it. You have used a good language. You have developed good habits of thought. Take them into every language, every project, every line of code you write for the rest of your career.
Thank you for reading this textbook. Thank you for choosing Pascal. Thank you for staying until the last page.
Now close this book and go build something.
"People think that computer science is the art of geniuses but the actual reality is the opposite, just many people doing things that build on each other, like a wall of mini stones." — Donald Knuth
"The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities." — Edsger W. Dijkstra
"Simplicity is prerequisite for reliability." — Niklaus Wirth (1934-2024)