Skip to content

nostdahl.com

A technology journal
Article archive
← All articles
Programming

Back to Pascal: Why I Picked Up Delphi and Lazarus Again

Bjørn T. Nøstdahl

~5 min read

Twenty years after I wrote my last serious Delphi program, I installed Delphi Community Edition and Lazarus on the same evening. I expected a nostalgia trip. What I got was a surprisingly productive toolset, and a list of questions about why I ever left.

Where Pascal fits in my story

If you have read the About page, you know the sequence: BASIC on a Marathon 32K, then Pascal, then Delphi, then PHP, and for the last many years C#. Pascal was the language that taught me structure. Delphi was the tool that taught me that a single person could ship a real Windows application with a database behind it, in an afternoon, and that the application would still run years later.

Then work pulled me towards web, cloud and C#. Delphi faded out of my daily routine, and I assumed it had faded out of the world too. That assumption turned out to be wrong.

What made me look again

Three things happened within a few months of each other.

First, a colleague in cash automation mentioned that one of the service tools we still rely on in the field is a Delphi application from the early 2000s. It compiles with the current version. It runs on Windows 11. Nobody has touched the core logic in a decade. How many of my .NET Framework projects from the same era can say that?

Second, I needed a small native tool for a Raspberry Pi in my home lab, something with a proper window and a couple of charts, and I did not want to drag a browser or a runtime onto the device. Lazarus builds native ARM binaries with a form designer that feels like Delphi 7 grew up. That solved the problem in an evening.

Third, Delphi Community Edition exists. It is the full IDE, free for individuals and small teams under a revenue limit, with VCL and FireMonkey included. That removed the last excuse.

The two tools, briefly

I will write a proper comparison later, but the short version:

  • Delphi is the commercial product from Embarcadero. One codebase can target Windows, macOS, iOS, Android and Linux through FireMonkey, while VCL remains the gold standard for native Windows desktop work. The IDE, debugger and data access layer (FireDAC) are mature and polished.
  • Lazarus is the open source IDE built on the Free Pascal compiler. The Lazarus Component Library (LCL) mirrors the VCL closely enough that a lot of code moves between them with little change. It runs natively on Windows, Linux, macOS, FreeBSD and the Raspberry Pi, and it costs nothing.

Both speak Object Pascal, so time spent learning the language pays off twice.

What surprised me

Compile times. I had forgotten what a full rebuild in under two seconds feels like. The edit, compile, run loop is so short that I stopped reaching for unit tests as a way to avoid starting the application. I still write the tests, but for different reasons.

Readability. Object Pascal is verbose in the way a well-written contract is verbose. begin and end are noisy on screen, but when I opened that twenty-year-old service tool I could read it top to bottom without a single "what does this do". Can you say that about the last JavaScript bundle you inherited?

The language has moved on. Generics, anonymous methods, inline variables, records with methods, class helpers and interfaces are all there. It is not the Pascal from my school books. Lazarus and Free Pascal lag Delphi on a few of these, but the core is modern enough.

The deployment story. A Delphi or Lazarus executable is one file. No runtime to install, no framework version to pin, no container to ship. For service engineers who need to run a tool from a USB stick on a customer's machine, that matters more than any architectural purity.

What has not aged well

I do not want this to read like an advertisement, so here are the rough edges.

The community is smaller than it used to be, and a lot of the online material is old. You will find forum answers from 2004 ranking above documentation from this year. Package management is improving but is nowhere near npm or NuGet. And the Delphi licensing beyond the Community Edition is expensive enough that you need a business case, not just enthusiasm.

Lazarus has its own quirks. The IDE looks dated out of the box, the docking layout is an add-on, and the quality of third-party packages varies a lot.

A plan for this series

I want to use this blog to relearn properly, so expect a handful of articles over the coming months. The rough plan is to cover choosing between Delphi and Lazarus, a refresher on the language itself, building a first cross-platform desktop application, memory management, databases, REST and JSON, threads, and finally how to apply the DevSecOps habits from my day job to a Pascal codebase.

If you learned Pascal at school and have not touched it since, I think you will be surprised too.

Questions for you

I am writing this partly to learn, so I would like to hear from readers:

  • Do you still have Delphi or Pascal code running in production? How old is it, and what would it take to replace it?
  • If you were starting a small native desktop tool today, what would you reach for, and why not Pascal?
  • Which topic from the plan above should I cover first?

Send me an email at bjorn.nostdahl@nostdahl.com and I will fold the best answers into the next article.

Continue exploring
← All articlesMore in Programming →