FP is an interesting language. In my opinion, it is somewhat problematic that different language concepts (Delphi, etc.) have been more or less merged into FP, resulting in redundant object models, for example. Pascal as a language also has various historical legacy issues (dangling else, block overhead, global namespace, etc.), which Wirth corrected in Modula and Oberon. The compiler is huge and apparently difficult to maintain (see e.g. https://github.com/rochus-keller/freepascal/). The resulting, optimized x86 code achieves about 70% of GCC compiled C code (see e.g. https://forum.lazarus.freepascal.org/index.php?topic=64261.0), and it turned out that desctructors and some built-in data structures are extremely slow. So I went on to implement my own Pascal/Oberon descendant (see https://github.com/rochus-keller/micron/, work in progress).
I've been using it for a while. The string handling is magic compared to that of C/C++ with pointers and nulls and the constant need to allocate and free memory to get things done.
The only downside is the documentation. Listing the parameters of a function and not explaining the purpose of the function, or what those parameters actually mean, is not proper documentation.
Borland set a fairly high bar with the Turbo Pascal 3 manual.
Pascal is not a low level language - quite the opposite.
That being said, various implementations provide low level facilities, including turbo pascal back in the days , and free pascal which I did use in the early 2000s.
If I were you, if you like fpc, I’d actually look into Ada ( the OO part is a bit odd granted but works ). You’ll get extremely high control over low level stuff ( it’s used in the embedded world ) along with high expressivity and excellent performance.
The way you express it is different from most other languages I’ve come across.
It doesn’t make it bad in any way ( I’ve written Ada professionally), just unusual. Basically Ada already provides natively substantial capabilities relative to encapsulation, modularities, generics etc but in a procedural context. The designers bolted on OO facilities on top of said existing mechanisms.
While it may look reasonably clean in the link below, I’ve always found it integrates badly with an existing codebase, the primary problem being that the ‘boundaries’ of the objects are not clearly visible.
Out of curiosity, where were your pain points with Go regarding lack of classes? Go offers types, methods & interfaces, that gets you pretty far while avoiding inheritance. I found it pretty reasonable and not limiting (coming from a background with C/C++/Java then years of python).
FP is an interesting language. In my opinion, it is somewhat problematic that different language concepts (Delphi, etc.) have been more or less merged into FP, resulting in redundant object models, for example. Pascal as a language also has various historical legacy issues (dangling else, block overhead, global namespace, etc.), which Wirth corrected in Modula and Oberon. The compiler is huge and apparently difficult to maintain (see e.g. https://github.com/rochus-keller/freepascal/). The resulting, optimized x86 code achieves about 70% of GCC compiled C code (see e.g. https://forum.lazarus.freepascal.org/index.php?topic=64261.0), and it turned out that desctructors and some built-in data structures are extremely slow. So I went on to implement my own Pascal/Oberon descendant (see https://github.com/rochus-keller/micron/, work in progress).
Thanks! I will check it out
I've been using it for a while. The string handling is magic compared to that of C/C++ with pointers and nulls and the constant need to allocate and free memory to get things done.
The only downside is the documentation. Listing the parameters of a function and not explaining the purpose of the function, or what those parameters actually mean, is not proper documentation.
Borland set a fairly high bar with the Turbo Pascal 3 manual.
Pascal is not a low level language - quite the opposite. That being said, various implementations provide low level facilities, including turbo pascal back in the days , and free pascal which I did use in the early 2000s.
If I were you, if you like fpc, I’d actually look into Ada ( the OO part is a bit odd granted but works ). You’ll get extremely high control over low level stuff ( it’s used in the embedded world ) along with high expressivity and excellent performance.
In what way is the OO part a bit odd?
The way you express it is different from most other languages I’ve come across. It doesn’t make it bad in any way ( I’ve written Ada professionally), just unusual. Basically Ada already provides natively substantial capabilities relative to encapsulation, modularities, generics etc but in a procedural context. The designers bolted on OO facilities on top of said existing mechanisms.
While it may look reasonably clean in the link below, I’ve always found it integrates badly with an existing codebase, the primary problem being that the ‘boundaries’ of the objects are not clearly visible.
https://learn.adacore.com/courses/Ada_For_The_CPP_Java_Devel...
I will add that the existing non oo features are excellent and I would even argue that in many cases you don’t need OO.
Out of curiosity, where were your pain points with Go regarding lack of classes? Go offers types, methods & interfaces, that gets you pretty far while avoiding inheritance. I found it pretty reasonable and not limiting (coming from a background with C/C++/Java then years of python).
Not me personally, but I just finished playing a retro FPS set in 1980s Czechoslovakia whose game engine is written in Pascal: https://store.steampowered.com/app/824600/HROT/