This is a nice introduction. Apparently the author also implemented a full game engine in Object Pascal: https://github.com/castle-engine/castle-engine/. I wonder whether the performance is sufficient; according to available benchmarks (e.g. the CLBG) the code generated by FreePascal is about three to four times slower than C/C++; does anyone have experience with it?
> FreePascal is a compiler, C and C++ are languages
Thanks for this really helpful remark. FreePascal is a compiler and also a Pascal dialect (actually two, one with classes). All examples in the referenced document start with "{$mode objfpc}", i.e. the OO FreePascal dialect. The CLBG results are also from the FreePascal compiler, currently version 3.2.2 (compared with GCC 12.2). The question was whether the generated code is fast enough for the game engine.
And yes, there is even an LLVM backend for FreePascal, but it's not the official one, only supports a fraction of the platforms, and the generated code apparently is not really much faster.