There is much to be said about programming languages. If I mention any language, someone will always have something bad to say. The syntax might be ugly, a feature may be missing or the executables might run too slow. Even if you benchmark languages, you can adjust what’s important to you to make almost any language win the benchmark. The really troubling thing is that even if you found your perfect language, that was theoretically brilliant, you still might not be able to become productive with it. Even if it had all the features and the nicest syntax in the world, it still might not be efficient for developing a real-world program.
About six years ago, I started programming with Python. It’s wonderful in so many ways. And if you create a real executable that is optimized to native code with Psyco, you can’t just dismiss it just for being a scripting language either, like some people do, since it won’t matter for all practical situations. However, any Python-program above a certain size get to feel the downside of the dynamic nature of the language. Parts of a Python-program can be totally wrong, but go unnoticed if it’s in a rarely used part of the program. In small programs, this isn’t a problem, since most of the code is tested every time it’s run. But for larger projects, the code hidden in exotic branches quickly can get out of hand. To compensate for this, all companies I know of uses testing-frameworks to test as much of the program as possible with small specially made tests. I’ve worked for a company like this, where the flagship-program was written in Python and we used as much time writing tests as writing the actual program. This doesn’t make Python bad, I still love it, I’m just saying that for programs over a certain size, a lot of testing is required. This problem is also in place for Ruby and all other dynamic languages.
So, after my encounter with Python (and several other languages), I tried searching for a solid language. A language that would give me the feeling of robustness and completeness – a language that would compile executables I could really trust. I learned Scheme at the university, Haskell in my spare time, went through an Erlang tutorial and took a second look at Lisp. Scheme and Lisp are just so much writing. Erlang looks great, but Haskell is the language that really convinced me. Haskell has a strong background from academia, which really shows if you visit #haskell at irc.freenode.net – it’s filled with phd’s and whatnot. So, off I went to learn Haskell. I read tutorials, bought a book, asked questions at IRC and wrote small programs. And indeed – Haskell feels incredibly solid. When you’ve written a program, then you really know that you can trust it. It may take a few attempts to make it compile in the first place, but the result is pure rocket science.
Python and Haskell are opposites, in many ways. Python is a dynamic and object oriented scripting language, while Haskell is static, functional and easy to compile to native executables. Python is like a young dolphin while Haskell is like a big white rhino.
Then I discovered Pixel, a program like Photoshop, written by a single Slovakian guy named Pavel Kanzelsberger, which rivals Paintshop and The Gimp. And unlike Photoshop, it runs on Linux and many exotic platforms like BeOS, QNX and SkyOS. I wonder if it runs on Haiku, please let me know if you find out! I downloaded the demo a few hours ago, and it looks great. The interface is smooth and responsive, and it’s at least as comfortable to work with as Photoshop, Krita, The Gimp, Paintshop and the like. Since it’s uncommon that a program runs on so many platforms – especially programs made by a single guy – I did some research and found out that it was made in Pascal. Pascal! The language of my childhood, right after I learned QBASIC.
While I was first surprised by this, another great program written in Pascal came to mind: Fast Tracker II. It’s a brilliant program for making music with samples, still to see its equal on Linux. Soundtracker is functional, but ugly and Cheesetracker is an Impulsetracker clone. Milkytracker looks great, though, but I wish it was open source. Why select the lukewarm “freeware” instead of trying to earn money like “Pixel” or going the full way with open source? I bet FT2 would be open source if it was written today.
Anyway, to get back on track. My point is that some of the applications I’ve seen written in Pascal are absolutely brilliant! Even though there are good programs written in other languages too, of course, there is something special about FT2 and Pixel that just seems to be harder to achieve with other languages. This might just be my very subjective feeling, but it is my heartfelt impression so far. Besides, the free pascal compiler is really good! It’s mature, compiles quickly, is more cross platform than the average program written in C (not many C-programs are as cross platform as Pixel). It’s object oriented, has templates and is a modern, up-to-date language, unlike the old dialects of Pascal. And Lazarus, an IDE that looks a bit like Delphi, is a lot more responsive then say Eclipse, while having many of the same features. The screenshots of Lazarus looks a bit dated since they compiled Lazarus with the old Gtk. Gtk2 with nice fonts is now possible. FPGUI looks promising too.
Judging by the actual results, in form of applications, Pascal might be the thing! For sure, I’ll give the Free Pascal Compiler a shot next time I’ll write a full fledged GUI-program. What would you choose for your next project?