Welcome Back Delphi
Several years ago I said goodbye to the programming language in which I took my first stumbeling steps as a coder. I had moved on and there were no reasons to believe I’d ever go back. I was wrong. A reason emerged and Delphi 2009 now has a place, both in my computer – and in my heart.
A sort of homecoming
Firing up the new IDE from CodeGear with Delphi for Win32 felt a lot like coming home. The outstanding graphical editor was there as was the lightning fast compiler. Visual Studio is great in many ways but it can’t compete with CodeGear’s RAD Studio when it comes to speed and rapid application development.
Not only that, the language (Object Pascal) has finally woken from its stagnated state and is getting increasingly modern. It now implements, for instance, closures (anonymous methods) which is quite rare for a non garbage collected language.
type TClosureProc = reference to procedure(AMsg: string); function CreatePrefixedWriter(APrefix: string): TClosureProc; begin Result := procedure(AMsg: string) begin WriteLn(APrefix + AMsg); end; end; var Log: TClosureProc; begin Log := CreatePrefixedWriter('Closure Test: '); Log('Write this'); Log('And this'); end.
The above program should produce the following output.
Closure Test: Write this
Closure Test: And this
I gotta wear shades
I am not the only one being thrilled with the rebirth of Delphi. A look at the TIOBE Programming Community Index for February shows that Delphi is the 9th most popular programming language, with a steady increase. That is a lot better than the 15th position a year and a half ago. At that time Delphi felt like a marginalized language with little promises for the future; Now it feels alive and vibrant.
Since the magic is back, I think I’ll stick around for a while.
Cheers
Oy!
Perhaps not everyone is aware that Delphi is still being used in several areas but that doesn’t mean it’s back :). Delphi will never be back with Embarcadero. It’s nice though to see that Delphi is still alive somehow but what Delphi lacks is the platform independency which is really important nowadays. When I have to decide what language or technology I have to use this independency really matters. Why do I want to stick myself to an operating system in the first place? Even if I’d just plan to use a specific operating system at first I still want the opportunity to change later.
I myself used Delphi from version 2 to 4 (including) and I really loved it because I could create things in a really short time. Rapid application development was reality with Delphi but just for the Windows operating system. Later on they showed up with Kylix which is still the biggest crap they’ve ever released.
Now your blog caught my eyes and I thought “yessir!” and hoped they’d release something more open. More open to a standard which exists but no, they are still doing their own things. Let’s see Ada e.g… They established a standard and if you have a standard compliant Ada compiler you can be sure to compile your code that was valid even >10 years ago so what does Embarcadero offer? Their own.
Sometimes I think about doing some objective pascal but then I think “na! not worth the time” and I’m always right and do you know why? Because I simply don’t need it and I simply can’t have it. Everyone agrees that freepascal e.g. is sane but how useful is freepascal to me? The success of a language is not always made just because of the language itself. I need interfaces to all kinds of libraries, database systems etc…I know that there are several bindings but they are in contrast not sane. And yes, I’m talking about freepascal because they at least try to establish something but they aren’t following the strict standard. There is also the gnu pascal project and they seem to follow certain standards which is really nice but they have the same problem as freepascal. Even worse…for gnu pascal there almost no bindings to anything. Yes, it’s quite easy to build them yourself but it’s also a matter of time and time means money.
Well, I think I’m probably just wrong but that’s my feeling about this topic.
Kind regards,
Andreas.
Thank you for sharing your thoughts Andreas. I’m a right tool for the right job kind of guy. If I need platform independence I’d go for a virtual machine based architecture, but if I want to build an application targeted for the Win32 platform I would look for a better fit. That’s where I think Delphi still has a role to play.
I have no opinion of Embarcadero. As long as Delphi goes on evolving I’m happy.
And yes, Kylix was a big disaster.
Andreas: They’re currently working on new compiler technology that will make cross-platform compilation very simple. I agree it’s taking way too long, but by all indications they’re back on track with Embarcadero.
Borland ran Delphi into the ground. It’ll take a little bit of time to get back on their feet, but they’re definitely moving in the right direction and soon they’ll be back on top.
heh, let’s hope they are not “Getting back on track tomorrow” but getting back on track yesterday :).
Yeah, but you’re screwed when you get your begin/end stuff out of alignment. It’s kind of hard to figure out which end goes to which piece of code. And it’s even more difficult when an if/then statement is one of those two-liner deals where the end is implied.
And if I mail my PHP or C/C++ code to someone, and the email changes the line wraps, the code usually runs. But not so Delphi.
That’s one of the main reasons why I don’t do Delphi.
It also suffers from custom control upgrade issues that VB suffers with.
Soooo glad I’m on PHP and purely doing web development on Linux.
Where did you get that from? Where the Begin/End are placed have no importance, if you have them correctly separated by ;
I’m afraid you’ve been misled on this one. Delphi (Object Pascal) is mailable, with or without line breaks, trust me. And begin/end is equally easy, or difficult depending on how you look upon it, to get out of sync as brackets.
With that said: I love working in PHP too. It’s my favorite web development environment next to Ruby on Rails.
See Delphi was a copy of Visual Basic, a RAD tool, only done right. The VLC library was trully an amazing piece of work. Object oriented, very nicely wrapped around all parts of Win32 and extremely fast! The assembler code emitted by the compiler was just phenomenal.
At the time you could use MFC with C++ to build a non-hackish (I mean proper) Windows based application. It was patchy and stiff. Even Microsoft did not trust MFC for their applications!
From what I remember Delphi would trivially cooperate with assembly, C and COM libraries. So the interoperability argument doesn’t sound right. I believe that at some point it went all the way to .Net (not tried that).
It died because of Java which took a heck of a lot of ideas from Delphi (the whole thing of a proper library with template-ish data structures, including the actually worse in my opinion Swing thing) and added for the first time no-hassle cross platform code.
I still think cross-platform C is just a sick joke and .Net is digging its own traps by ignoring the stuff across its platform. I would say by seeing C# 4.0 it seems to me more of an academic project or a designerly experiment.
The reason I wouldn’t go back there is the strong typeness of Pascal. Oh man what a paranoid type checking extravaganza that was. The world of applications is getting dynamic and I don’t see how that would fit with the language. It’s like putting a Ferrari engine on a beatle car.
Totally agree, except that I still enjoy the fail fast property that comes with strongly typed languages and a fast compiler. But that’s the only thing I miss when working with dynamic languages like Ruby and JavaScript.
I was a huge fan of Delphi from versions 3 to 6 back in the days. I wrote a few noteworthy systems using Delphi. And a bugfix (or two) of mine even made it into the VCL.
But as a contractor/consultant, some of the worst code I’ve run into has been written in Delphi. Something about having a low barrier of entry, like Visual Basic, attracts many untrained (hobby) developers. One of the ugly side effects of RAD. In any case, the older I get, I find that my brain (and carpals) seems to reject verbose languages like Pascal.
Though to be fair, I’ve grown to equally despise Java for both similar and different reasons. C# is still my daily-use, workhorse language. Albeit, I’ve been slowly gravitating towards terse, dynamic languages as preferred. Any chance I can use IronPython or IronRuby, instead of C#, I take it. Less typing, faster dev time, easier to manage dependencies, more flexible and adaptable…
Yes, a low barrier has its pros and cons. What I always appreciated with Delphi is the fact that it has both a low entry cost and a high potential. There was nothing you could do in say C++ that couldn’t be done in Delphi, often with less effort.
Any developper that equates less typing to faster dev times is a liability in my book, as they’re typically one-step shy of using single-character identifiers (or considering everything is either a hammer or a nail, which is just as bad), even though they often don’t realize it themselves.
I was referring to the verboseness of the language, not personal coding style, or object/variable names. There is no need for a language to be overly verbose. Language warts are usually constructs used by lazy compiler writers.
Mainly I was pointing out how my preference has evolved away from strongly-typed, static compiled languages and towards dynamic, interpreted ones.
Welcome back!
Delphi, my daliy-use IDE since 1996.
Reasons:
– Good IDE.
– very fast compiler.
– fast Applications.
– thousands of components.
– easy to deploy the Applications.
– Applications run also on Linux. (WINE)
What should be improved.
– smarter way to pass a project from one person to another.
– remove #J and .NET stuff from the IDE.
Thank you Samuel. For me, the most important improvement should be to fix the awful help system. Highlighting a word and pressing F1 usually doesn’t get me the information I seek anymore.
Delphi stumbled a little, but it didn’t really go away.
Welcome back all the same. 🙂
Delphi is ok. But I’m running out of business cases for it. Most of my work is web or embedded (ARM) nowadays…
Oh Delphi! Once we had a love affair you and I. I remember the days when I took my first baby steps as a programmer and you were there to hold my hand. Such applications we made you and I. Then I started cheating on you, moving on to newer and shinier things. Little did I know that you would come back to my life, with a vengeance. In my present job you were hiding, in the disguise of badly written Delphi 5 application. Once again we began to speak to alas, the spark was gone, lost forever in the midst of programming languages that actually care about my feelings.
I liked Delphi back in the days but I don’t think I ever will go back. Just having to declare all variables at the beginning of a method makes me want to smash my head in the wall.
That story sounds like something I could have written 🙂 Nontheless I’m back using it, and I actually enjoy it.
I don’t have a problem declaring the variables at the top. What I do have problems with is the lack of garbage collection. It turns out I’ve gotten so used to it that working without one is now somewhat painful.
You could use Castalia for inline variable declaration. They’ve been improving the IDE pretty well though, so perhaps this nice feature will be in a future versions:
http://www.twodesk.com/castalia/inline_variable_declarati.html
When I read title of your post, I wished you’ll be talking about Lazarus.
I too love Delphi but let me see if I get this right — to you, Delphi has made a come back because:
1. Great IDE (I thought it was also great before D2009).
2. Fast compiler (see the above).
3. Anonymous methods. Now, is there a reason why one couldn’t develop fantastic applications in Delphi without using anonymous methods?
Good question! But you’re slightly off when it comes to the reasons you listed.
My point is that it feels like Delphi has finally turned a decline in both quality and interest with the 2009 version.
Of course one can develop fantastic applications without anonymous methods, that can be done in any language, but the thing is, adding these features send the signal that Delphi is a live and evolving language. And, for a language that supports the functional paradigm (along with the object orientation) closures is a natural and useful construction.
Having to declare the variables is actually a good thing, IMHO. The alternative would be to risk finding oneself imerged into a “white noise” kind of code after a while, Perl-ish style. And yes, the Help system is horrible; I miss the Delphi 6 Help system.
There’s always pros and cons with everything. I can’t decide which way of declaring variables (at the top, in the body, or not at all) is better. It depends. And I embrace them all.
I agree with you on the help system, but that, on the other hand, is the only thing I miss from the Delphi 6 IDE.
If we skip the scripting languages in the “TIOBE Programming Community Index” and we confound C, C++, and C# then Delphi is in position four. And I bet most VBasic programmers chose that language because it’s all they know, rather than because they think it’s better than Delphi.
I just don’t get it. What’s wrong with doing it this way???!
procedure Log(AMsg: string):
begin
WriteLn(‘Closure Test: ‘,AMsg);
end;
begin
Log(‘Write this’);
Log(‘And this’);
end.
The above program should produce the following output.
Closure Test: Write this
Closure Test: And this
Good question!
In your example the prefix is hard coded in the log function. If you’d like another log function with a different prefix you’d have to create another function. Additionally, the code that utilizes your log interface is bound to that particular log function.
In my example I can easily create a different (prefixed) log function dynamically and have the utilizing code invoke it without change.
Of course the same effect can be achieved with a nice object oriented approach, (or even with your approach and a global prefix variable) but the purpose of this post was not to show how to create a prefixed log function…
I’m using Delphi for almost 9 years !
Nothing is impossible with this great tool.
The new RAD Studio edition is really really a good product. I really hope that Embarcadero will lead Delphi back to it’s glory road.
Me too! I really hope Embarcadero succeeds. They’re definitely on the right track with the 2009 version.
Delphi is still used .
I use Delphi 7
Delphi 2010 is EVEN BETTER than Delphi 2009. I am loving it (other than help, but it is getting better).
I’ve used Visual Studio, Netbeans, QT and other enviroments and I can tell you that to this day, Delphi is still the best for RAD tool out there. Period!
i agree with G.S Delphi 2010 is JUST AMAZING i was expected it to be better than 2009 but when i played aroung with the ide for a while i was amazed by how much they have improved their RAD in terms of quality and speed