Hacker News new | ask | show | jobs
by Rochus 233 days ago
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).
3 comments

> 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.

That was not an FP invention, though. Delphi already did it - they kept the Apple's Object Pascal constructs from Turbo Pascal, and then bolted a whole new object system in parallel. FP inherited that mess and has to maintain it for backwards compatibility reasons. That said, given that the two systems are completely orthogonal, you can simply ignore the older one.

The biggest thing going in favor of FP is that it has been around for almost 30 years now, so it's very mature.

> it has been around for almost 30 years now, so it's very mature.

The compiler is insanely large and complex, more than the sum of the implemented languages would suggest. I can't imagine that anyone still has a complete understanding of it. See e.g. https://github.com/rochus-keller/FreePascal/blob/master/Read....

Thanks! I will check it out