Hello again, Delphi. It’s been a while.

A few weeks ago I had to look into an old program to add a few new features. I had written it in Delphi, a long time ago, before the age of free Versions of Visual Studio hanging around. As all my computers are running some flavor of BSD or Linux now, I fired up a VM, installed the old trusty Windows 2000 license I keep lying around and dusted off the Delphi 7 CD.

A few minutes later, my mind was blown.

It’s amazing what a fine development system Delphi used to be. After all those years of using C# and Java professionally, and playing with Python and Scheme, this old Pascal based language still rocks. Just like Win2k, by the way: It’s fast, stable, responsive, and does just what I need it to do. Right inside a 512 meg VM. So much for living in the future…

Back to Delphi: Say what you want about Object Pascal, I felt productive right from the start. All those old tricks learnt ages ago still work. The changes to that old source code were just too easy, it almost felt as if I had forgotten something. But the tests ran, and the client is happy. And I’m wondering.

What is it that makes good ol’ Delphi 7 still compare favorably to lots of development systems out there today? The language didn’t have Lambdas (newer versions of Delphi do have a stripped-down Lambda-like thing), there is no Garbage Collection, and the runtime and component libraries don’t consist of thousands of classes that do virtually everything for you. And the editing features of the IDE pale in comparison with pretty much everything out there today.

But. The visual designer is great. Even better than the one found in Visual Studio 2013, IMO. The components found in Delphi 7 Pro still make designing GUI applications a snap. Changing screen resolutions? No problem. Layout adjustments? Got it. Database access? Yup. Everything just works. And the language does have reference counting and RAII, something that lots of old school Delphi developers sadly don’t seem to know.

Can’t say good things about Delphi .NET, though. Or Kylix. Or all those ill-fated versions coming after them. Slow, buggy, unstable, bah. The job market crumbled. That was when I abandoned Delphi and went to seek out greener pastures in C# land. Delphi started to suck.

Until, well, now. I tried the XE5 version for a project at work and while I’m not exactly thrilled with the new IDE, it still has some of that old Delphi feeling. Sure, I’m a nostalgic. Memories are written in golden ink. But still, I think trying to emulate the Visual Studio IDE is a step backwards here. The resource hogging, the slow startup, the gruesome stuff they call documentation are Bad Things ™. Delphi used to be quick, snappy, with real documentation coming up at the press of F1. No online search, no links to Youtube videos banned at work. Real, fast offline help. Even PDF files with a complete language reference.

Still, the new XE5 and now XE6 do have a lot going for them. The language has Generics that expose the Java ones as the joke they are. You could call Object Pascal a cleaner version of C++ that allows you to do pretty much the same things, only simpler, and with a way faster compiler, and a fine default GUI library, and database access, and a nice IDE. Unit tests are there, refactorings work. If you do need C++, there’s C++Builder.

What sealed the deal for me was the ability to write your code once, and then compile down to an Android app. Or to iOS. Or old-school Windows, or OS X. Same codebase. Fast compiler. Native code, statically linked. No slow Dalvik shit. No need to try and bend HTML and JavaScript to do what you want. Want to access the native API? Conditionally compile a few classes, and you have hardware access way simpler than with a PhoneGap plugin. Developing an Android app in Delphi blows the ADT bundle right out of the water. And the apps start up fast. Just like Delphi programs start up fast on Windows. Compare that to the second .NET programs take even from an SSD.

So will I switch to Delphi? No. Object Pascal doesn’t stand a chance against C#: GC, real lexical scope, LINQ, and all the dynamic introspection stuff. Nuff said. And Visual Studio has free versions that are good enough for most smaller projects. The cheapest version of Delphi usable for professional development is way too expensive for my taste. But for mobile development at work, or for simpler utility programs that don’t have to be installed on top of the full .NET framework, I’ll use it.

At home, I’ll go for Lazarus instead. It isn’t as stable yet, but it has the good old Delphi feel. And it’s free in both senses of the word. And runs on Linux.

Looks like I’m a fan again.


One thought on “Hello again, Delphi. It’s been a while.

  1. Pingback: The year of Windows 2000 on the desktop? | (define answer 42)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s