Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Free Pascal and Lazarus seem really really great, and I wanted to really look into the ecosystem, but doing a bit of surface researched revealed some concerns that held me back from going any deeper

- Pascal seems like a mature language but looks like it's got its warts and being a language of the 80/90s may not offer the niceties of languages that came after it. One concrete criticism I came across was some inconsistencies in the language design meaning you want to be careful as some things work one way and others another way, and some things don't work as you expect (at the syntax/semantics level if I recall correctly).

- GTK support is still work in progress according to wiki pages I could find: mainly GTK3(??) and GTK4 which aren't 100% stable. If you want to use GTK2 that seems fully supported. Given the Linux GTK based distros are on GTK3 and moving to 4, seems less than ideal. I'm not sure if/how much the situation is better in the QT bindings.



It looks like a relatively easy to learn language.

The QT bindings are pretty up to date according to the wiki:

https://wiki.lazarus.freepascal.org/Qt5_Interface

https://wiki.lazarus.freepascal.org/Qt6_Interface


Have you used Lazarus or FreePascal for any significant project?

I was hoping to get some insight from someone who's deeply familiar with it and can provide their experience and opinion after using it for a reasonable amount.


Here's a list of projects using FP+Lazarus.

https://wiki.freepascal.org/Projects_using_Free_Pascal


No I have not, I would also be interested in an answer from someone knowledgeable. It might be worth asking on the Free Pascal forums.

This suggests GTK3 support is not going to be great any time soon.

https://forum.lazarus.freepascal.org/index.php/topic,63867.m...


> Pascal seems like a mature language but looks like it's got its warts and being a language of the 80/90s may not offer the niceties of languages that came after it.

My recommendation is to ignore language design, I spent a lot of time trying to find the best way to create cross platform desktop applications in a "nice" language. This was just time wasted.

What you should look at is how productive you can be and how much of the problem space the language and framework solves for you.

By changing to this perspective you will notice that your number of options increases drastically.


> inconsistencies in the language design meaning you want to be careful as some things work one way and others another way, and some things don't work as you expect (at the syntax/semantics level if I recall correctly).

It equally applies to ANY current programming language, including the fashionable Golang and Rust, not to mention Python, Java, C#, C++ or JavaScript.

So this argument is childish.


The Lazarus ide always felt jank to me, esp. on Linux. The FPC textmode "Turbo Vision" like ide is fine, but I don't see how someone used to Delphi or VB can tolerate building anything with Lazarus. The polish isn't there.


> The FPC textmode "Turbo Vision" like ide is fine

Fun fact, recently an attempt to add unicode support to Free Vision (and related units) was submitted to the repository and while that worked, it broke a bunch of things and introduced extra jank (and a massive performance regression, even if you are not using the unicode-aware units) to it (including the textmode IDE, which -e.g.- crashes the second time you try to build something).

But this is in the development version from the repository and there are no plans currently to make a new release soon, so chances are by the time a new release is made this will be fixed.

> I don't see how someone used to Delphi or VB can tolerate building anything with Lazarus. The polish isn't there.

Personally i find Lazarus much more polished than Visual Basic ever was.


I don't know what you are comparing to, but Delphi this year and age is far from polished either.


> One concrete criticism I came across was some inconsistencies in the language design

Yeah that is a valid criticism, Free Pascal (and Delphi's Object Pascal, but because Free Pascal supports multiple dialects it is more pronounced there) isn't so much "designed" as "organically grown". On the other hand, you could say the same for any language that has been around for a long time and tried to add new functionality without breaking existing code.

In practice while you may come across the occasional 'gotcha', you won't really have much of a problem. E.g. in Free Pascal - and Pascal since Borland's Turbo Pascal - the function result is actually a hidden parameter passed by reference (this helps to avoid costly copies if you return records/structures). I've been writing Pascal code since the 90s and yet it was only very recently that this caused a bug in my code. TBH if you have written in C#, C++, Java, or any other "unexcitingly mainstream" language you'll be fine writing Free Pascal too.

The biggest issue with the language i have is the three different compound types ("record", "object", "class") and really it is mainly about how you can't do things with two of them ("record" and "object") that you can do with the third ("class") for seemingly arbitrary reasons (especially since under the hood the compiler treats them all the same). But it is largely an annoyance that you can almost always work around, not a roadblock.

> GTK support is still work in progress according to wiki pages I could find: mainly GTK3(??) and GTK4 which aren't 100% stable. If you want to use GTK2 that seems fully supported. Given the Linux GTK based distros are on GTK3 and moving to 4, seems less than ideal. I'm not sure if/how much the situation is better in the QT bindings.

For Gtk3 the main issue is the developer who mainly worked on the Gtk backends got tired of the Gtk developers breaking the API every new major version just as he was getting things working and decided to just abandon the effort. I think someone else is providing patches for Gtk3 nowadays though. Personally i contribute the occasional fix to Gtk2 as not only it is the most stable but also i prefer Gtk2 apps to Gtk3 apps. I also keep Gtk1 working (one neat aspect with Gtk1 is that you can statically link against it and thus make a binary that only relies on X11 - and OpenGL if you use that - like, e.g., the binary i have here[0])

However there is a lot of development on the Qt backend (AFAIK including the guy who used to work on Gtk3) to the point that it might become the default in the future. You can try the binaries of a tool i wrote from [0] that are built with Gtk1 (statically), Gtk2 (dynamically) and Qt6 (links to the Qt bindings statically but to Qt6 libraries dynamically) and see how they look like in practice (note that ironically the Gtk2 one might actually have issues - i built it from the repository version, not any official release). Note that i compiled this on my Linux PC running openSUSE Tumbleweed so it was linked against fairly recent versions (e.g. you need Qt 6.6 - a friend of mine running Debian couldn't run it because none of the repositories had it).

[0] http://runtimeterror.com/tools/piecemod/


Exactly the type of response I was hoping to get. You've covered basically 90%+ of what I was after. Thank you for the great comment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: