After my first article on returning to Pascal, the most common question in my inbox was simple: Delphi or Lazarus? The honest answer is that it depends on what you are building, who is paying for it, and where it has to run. This article is my attempt to make that answer useful.
The same language, two ecosystems
Both tools compile Object Pascal. Free Pascal, the compiler behind Lazarus, has a Delphi compatibility mode and tracks most of the language features Delphi introduces, usually a few years behind. A unit that only uses the core language and the RTL will often compile in both with no changes.
The difference is everything around the language: the IDE, the visual component libraries, the data access layers, the platform targets and the people you can ask for help.
Licensing and cost
Delphi is a commercial product. The Community Edition is free for individuals and small companies below a revenue threshold, and it includes the VCL, FireMonkey and FireDAC. Above that threshold you buy Professional, Enterprise or Architect, and the price is in the range where you need a manager to sign off.
Lazarus and Free Pascal are open source. The compiler and runtime library use a modified LGPL that lets you ship closed-source applications. The IDE is GPL, which only matters if you modify and distribute the IDE itself. For a company, this means no licensing audit and no seat counting.
Which matters more to you: a vendor you can call, or a bill you never receive?
Platforms
This is where the two diverge most.
| Target | Delphi | Lazarus |
|---|---|---|
| Windows desktop (native) | VCL, FireMonkey | LCL |
| macOS desktop | FireMonkey | LCL (Cocoa) |
| Linux desktop | FireMonkey (FMXLinux) | LCL (GTK2, Qt5) |
| iOS and Android | FireMonkey | Limited, community packages |
| Raspberry Pi and ARM Linux | No | Yes, natively |
| FreeBSD, Haiku, older systems | No | Yes |
| Web | Via third-party tools | pas2js transpiler |
If mobile is on your roadmap, Delphi is the practical answer. If you care about Linux on small boards, embedded industrial PCs or unusual platforms, Lazarus wins without a contest. For a Windows-only line-of-business application, both work, and the VCL is slightly more polished than the LCL on Windows.
Component libraries
The VCL and the LCL share a design. TForm, TButton, TEdit, TStringGrid, TTimer and TDataSource all exist in both, with the same event model. Code that lives in event handlers and data modules tends to port with a search and replace on a few unit names.
FireMonkey is different. It draws its own controls, supports styles and GPU acceleration, and behaves the same on every platform. The trade-off is that your application does not look exactly like a native application anywhere, and the learning curve is steeper if you come from the VCL.
Lazarus has no FireMonkey equivalent. The LCL uses the native widget set on each platform, so a button is a real Windows button or a real GTK button. That gives you a native look for free, at the cost of small layout differences between platforms that you will spend time chasing.
Data access
Delphi ships with FireDAC, a single driver layer for dozens of databases with connection pooling, local SQL, cached updates and good tooling in the IDE. It is one of the strongest reasons to pay for Delphi if your application is data-heavy.
Lazarus ships with SQLdb, which covers SQLite, PostgreSQL, MySQL, Firebird, Oracle, MS SQL via ODBC and a few more. It is simpler, less featured and perfectly adequate for most desktop applications. Zeos is the popular third-party alternative.
IDE and tooling
The Delphi IDE is more refined: better code completion, a stronger debugger, integrated refactoring, a visual form designer that handles high DPI well, and a package manager (GetIt) that is improving each release.
Lazarus is functional rather than beautiful. The form designer works well, the debugger is GDB or the newer FpDebug, and the Online Package Manager gives you access to a surprising amount of community code. It starts faster than Delphi, uses less memory, and runs on the same operating systems it targets.
One Lazarus feature I now miss everywhere else: lazbuild, a command-line build tool that compiles a project file with no IDE involved. Delphi can do the same through MSBuild, but it takes more setup.
Community and documentation
Delphi has a smaller community than in its heyday, but it is active, there are professional conferences, and Embarcadero publishes a steady flow of learning material. The Free Pascal and Lazarus community is volunteer-driven, lives on forums and the wiki, and is extremely helpful if you ask a precise question. Both communities overlap heavily.
The questions I ask before choosing
When someone asks me which to pick, I turn it around:
- Does it need to run on a phone? If yes, Delphi.
- Does it need to run on Linux, ARM or something unusual? If yes, Lazarus.
- Is there a budget for licenses, and someone to approve it? If no, Lazarus or Delphi Community Edition, and check the revenue limit honestly.
- Is the application mostly a database front-end? FireDAC tips the balance towards Delphi, but SQLdb is enough more often than people think.
- Who will maintain it in ten years? Pick the tool that person can install without a procurement process.
For my own projects the answer has been both: Delphi Community Edition for Windows tools where I want the polish, Lazarus for anything that runs on a Pi or a Linux box.
Questions for you
- If you have ported code between the VCL and the LCL, what broke? I would like to collect the real-world gotchas.
- For those of you on Lazarus in a company: did the open source license help you get it adopted, or did the lack of a vendor make it harder?
- Have you tried FireMonkey on Linux? Is it ready for a production desktop tool?
Email me at bjorn.nostdahl@nostdahl.com. The next article is a refresher on the language itself, written for people who remember Pascal from school and want to see what has changed.