Nearly all software developers of a certain generation learned to program with a version of the Pascal programming language. Niklaus Wirth designed the Pascal language with the intention of encouraging good programming practices using structured programming and data structuring. This made it perfect for teaching programming. Pascal has come a long way since it was first introduced in 1970, later evolving into Object Pascal, in much the same way and about the same time that C evolved into C++.

In celebration of the 26th Birthday of Delphi, the most popular evolution of Object Pascal, here are 26 things you didn’t know about Object Pascal. Or do you?

Niklaus Wirth

  1. Object Pascal has many modern implementations. A few of the modern implementations of Object Pascal include Delphi, Free Pascal, Oxygene, Smart Mobile Studio, and DelphiWebScript. All with regular updates and many new features from the original Object Pascal.
  2. Object Pascal is a multi-paradigm programming language supporting procedural, object-oriented, generic, imperative, event-driven, functional (partial), and structural programming.
  3. Delphi, the most popular evolution of Object Pascal, was introduced in 1995, the same year as Java, JavaScript, Ruby, and 4 years after Python.
  4. Object Pascal provides memory safety without the overhead of garbage collection, with optional reference counting. It also permits raw pointer functions and manual memory management, bypassing all abstractions.
  5. Object Pascal includes numerous concurrency features for asynchronous programming, such as thread pools, tasks, futures, and background threads.
  6. Object Pascal is self-extensible. It doesn’t require another language to add libraries, components, or interfaces. Delphi is written in Delphi, as are most other implementations. 
  7. Delphi combines native compilation to machine code with rich reflective functionality via Enhanced Run-Time Type Information (RTTI). 
  8. Object Pascal allows for object inheritance, polymorphism, interfaces, generics, closures, and dependency injection.
  9. Object Pascal has a strongly typed foundation, with support for variants, type inference, and duck typing.
  10. Embarcadero’s Delphi compiles modern Object Pascal to native 64-bit x86 for Windows, Linux, and Mac OS, with native 64-bit ARM support for Android and iOS.
  11. The RemObjects’ Oxygene compiler for Object Pascal adds targets .NET, WebAssembly, Cocoa, and Java.
  12. Free Pascal adds additional compiler platform targets like PowerPC64 and FreeBSD.
  13. Smart Mobile Studio and Free Pascal also transpile Object Pascal to JavaScript.
  14. The vast component library and property, method, event system made Delphi the first “Low Code” solution, while also giving you the freedom to write as much code as you want (see #6: Self-Extensible).
  15. Object Pascal is ahead of the curve: Object Pascal inspired many features of other languages such as C# and Java.
  16. Anders Hejlsberg, the architect of Turbo Pascal and Delphi, went on to architect C# and TypeScript, receiving the 2001 Dr. Dobb’s Excellence in Programming Award.
  17. PascalCoin is a cryptocurrency implemented in Object Pascal.
  18. Delphi supports building decentralized applications that interact with smart contracts on the Ethereum Blockchain.
  19. HeidiSQL is a very popular, open-source, database management client written in Delphi. Many other database management systems are written in Delphi thanks to its included database functionality.
  20. A 2017 research paper testing the energy efficiency of programming languages found Free Pascal to be the most memory-efficient programming language, and in the top tier for energy and performance.
  21. While Delphi continues to evolve, it is also committed to backward compatibility. Many 26-year-old programs can be recompiled with very few changes to gain access to new functionality and platforms.
  22. Object Pascal uses the source: The latest version of Delphi ships with 2637 source files, and 1258 sample files, for a total of 2,678,978 lines of Object Pascal source code.
  23. There is a component for that: Combining the shipping source with Delphi’s robust component model helps fuel the vibrant community of commercial and open-source components and libraries.
  24. Delphi supported building native apps for the Microsoft Store before Visual Studio.
  25. The best-known application written in Delphi was the user interface for the original Skype for Windows client. That technology was used when Microsoft acquired Skype for $8.5 billion USD — that is, they bought a Delphi application for that amount. Microsoft kept using Delphi for the Windows client until recently (for better or worse).
  26. There are multiple Delphi applications exceeding 10 million lines of Object Pascal source code that build to a single executable file, most with little to no dependencies. These compiled Delphi applications allow “xcopy” installation: no need for .NET runtime, JVM, language compiler or tools, runtime DLL, or any other file is required on the target platform. Your executable file is all you need. Delphi also allows for dynamic linking if that is your preference. 

Note: Unless otherwise specified, these facts are true at least for Embarcadero’s Delphi, and may vary for other Object Pascal implementations. There is such a huge variety in Object Pascal usage it is hard to make a single blanket statement that applies to all of them.

How many of these facts did you know? Have you kept up with Object Pascal as well as it’s kept up with the ever-changing demands of software developers like yourself? Not to worry if you’ve fallen behind; even if you are new to Object Pascal, it is surprisingly easy to learn and get up to speed as a productive programmer. Here is a list of free resources to get you started.

  • Free Delphi Community Edition – The IDE Runs on Windows but allows you to cross-compile to many other platforms
  • Free Pascal and the Lazarus IDE – Open source and runs on most platforms, even Raspberry Pi.
  • Trial of Oxygene – Part of the Elements family of languages, it runs in Visual Studio on Windows or its own Fire IDE on macOS
  • Smart Mobile Studio – The command-line compiler is free, or you can download the IDE Trial, and start transpiling Object Pascal to JavaScript.

The post Object Pascal – 26 Things You Didn’t Know About appeared first on The Crazy Programmer.