Free Pascal
LAZARUS

Lazarus versus Delphi

The most obvious reason for preferring Lazazus: it is free.

Compare this to Delphi: the cheapest version, Delphi Professional, was priced at $1719 in 2018 (other versions: from $4041 to $6466). Note that there is also a free Delphi Starter with severely limited features, notably with regard to database applications and the installation of third party components.

Features that are almost the same

  • Lazarus uses Free Pascal as its programming language, very compatible with Delphi's Object Pascal.
  • The Lazarus LCL component library is very similar to Delphi's VCL.
  • Tons of code written for Delphi can be used with Lazarus, either directly or after automatic conversion.

Some differences

  • The size of an executable file is much larger with Lazarus than the Delphi equivalent, because Lazarus stores debug information within the executable rather than as separate files. But the executable file size can be significantly reduced with settings in the Compiler options.
  • Some file formats: Lazarus uses .LPI, .LPR and .LFM, Delphi uses .DPR and .DFM
  • The documentation: Delphi's Help system is more complete. The Lazarus Help files that are installed are not very detailed, when you ask for context sensitive help. Most of the Lazarus documentation is found on the web at wiki.freepascal.org.
    Tip: you could also download the offline CHM Help for Delphi (215MB) for additional info ;)
  • Delphi's Code Completion is called Identifier Completion under Lazarus.
    In Lazarus, Code Completion combines Automatic Class Completion, Local Variable Completion and Event Assignment Completion. All of them are invoked by Ctrl+Shift+C. The IDE determines what is meant by looking at the cursor position. 
  • Lazarus supports Include files, that make it possible to write platform (in)dependent code without messing up your code with IFDEFs.