Modern Object Pascal guide

Link to Quick Modern Object Pascal for Programmers

Michalis Kamburelis and contributors: Maciej Izak

There are many books and resources about Pascal out there, but too many of them talk about the old Pascal, without classes, units or generics.

So I wrote this quick introduction to what I call modern Object Pascal. Most of the programmers using it don’t really call it “modern Object Pascal”, we just call it “our Pascal”. But when introducing the language, I feel it’s important to emphasize that it’s a modern, object-oriented language. It evolved a lot since the old (Turbo) Pascal that many people learned in schools long time ago. Feature-wise, it’s quite similar to C++ or Java or C#.

  • It has all the modern features you expect — classes, units, interfaces, generics…
  • It’s compiled to a fast, native code,
  • It’s very type safe,
  • High-level but can also be low-level if you need it to be.

It also has excellent, portable and open-source compiler called the Free Pascal Compiler, . And an accompanying IDE (editor, debugger, a library of visual components, form designer) called Lazarus . Myself, I’m the creator of Castle Game Engine, , which is a cool portable 3D and 2D game engine using this language to create games on many platforms (Windows, Linux, MacOSX, Android, iOS, web plugin).

This introduction is mostly directed at programmers who already have experience in other languages. We will not cover here the meanings of some universal concepts, like “what is a class”, we’ll only show how to do them in Pascal.

See here!