views:

2435

answers:

10

I'm a hesitant upgrader when it comes to development tools. For roughly half of my product I still use D7, and for others D2006.

The truth is, although Unicode support is more than welcomed and very useful, it could cause me more troubles than gains with my current projects (they are more-or-less Unicode ready already). It's especially case with one of them who's performance would suffer a lot if each string takes twice as much memory as before.

So, Unicode aside, what are other major incentives to upgrade?

+9  A: 

First of all I don't think you're going to notice that much of a performance hit.

Have a look at this

I'd say just generics make it worth the upgrade. Followed by Anonymous methods.

Steve
This is nice to know. But in this case, bottle-neck is actually extensive memory use, not CPU. So application would use close to twice RAM than before (for example, 1 GB instead of 500 MB is not small difference).It's a log parser and analyzer that keeps all strings in memory by design.
vrad
If it's a concern for this particular app, there is no obligation to use unicode. Just change all strings (which now default to unicodestring) to AnsiString, and it'll work as it did before.
Steve
You have the option to use UTF-8, which uses no more memory than ASCII for the same text, if that's what you need.
Craig Stuntz
+6  A: 

As steve said, the major language additions are a big plus. But there is an other thing.

Delphi had been in stormy weather the last years. And that was reflected by the versions. 7 was the last good version, 2006 was reasonable, but still below average. But now with 2009 a new era has started. Delphi has found a new home. And the focus is back on being the best development tool there is. There is still some backlog that needs to be solved, but as far as I am concerned Delphi is back on the way up.

Gamecat
+4  A: 

Delphi 2009 has proven to be much more stable than Delphi 2007, that alone for me would be enough to upgrade, delphi 2007 bugs and crashes are very annoying and stressful.

Fabio Gomes
+13  A: 

To put things in to perspective, look at the things that were added between Delphi 7 and Delphi 2007. This was a significant high water mark.

http://blogs.codegear.com/nickhodges/2007/03/28/33579

http://www.stevetrefethen.com/blog/VCLAndRTLEnhancementsSinceDelphi7D7.aspx

Delphi 2009 sets the bar even higher.

http://blogs.codegear.com/pawelglowacki/2008/11/03/38527

http://blogs.codegear.com/chrispattinson/2008/09/19/38897

Here are some of my favourites:

  • Generics (naturally) and generic collections in the RTL.

  • Improved build configurations where they inherit from a common base configuration.

  • DataSnap improvements, including removing COM dependencies.

  • Faster and more stable IDE over Delphi 2007, which was no slouch.

I'm not sure how I'm going to use them in production, but you have to admit that anonymous methods are really cool. I'm curious to see how people wind up using them with threading.

Just two things about Unicode support (another favourite of mine).

  • You will probably see a significant performance improvement when you convert your existing Unicode projects. I know I did.

  • You will need to be careful about converting any code that makes assumptions about character size. You probably won't see many problems if your existing code is Unicode aware.

http://dn.codegear.com/article/38437

http://dn.codegear.com/article/38498

http://dn.codegear.com/article/38693

Bruce McGee
+1, nice, nice, nice. Great links.
Peter Perháč
Nice summary and link collection. +1 on upgrade for Generics and More Stable IDE.
jamiei
+8  A: 

I recently upgraded from Delphi 4 to Delphi 2009, primarily because of Unicode, but also because of the many improvements everywhere in Delphi since my Version.

But the unexpected improvement that pleased me the most when I upgraded was the new IDE (Integrated Development Environment). Delphi 7 and previous versions had an undocked layout that drove me crazy. Now it is one docked form that can be resized and moved around easily. Not to mention many improvements to it that make every programming task easier. Remember, you spend all your programming time in front of the IDE, so every little thing made easier is a time saver.

When debugging and stepping through the code, all local variables are watched by default. That is extremely helpful.

The FastMM Memory Manager is built in.

And I now have both Delphi 4 and Delphi 2009 installed, and I can run either one, or even both at the same time. That was extremely useful when converting my programs, because I could debug and step through both together to ensure the converted program was working right.

Also, Embarcadero still gives a special upgrade price that Borland and then Code Gear did for all previous version owners. They didn't have to, but that is a great move on their part to treat the early adopters of Delphi as their VIPs.

What don't I like? Well, Delphi 4 started up in 2 seconds. Delphi 2009 takes about 15. But it's fast after that. Also stepping through code goes into the CPU code much more often because it is often inlined, and I don't think there's any way around that.

If you need Unicode, don't think twice about upgrading.

If you don't need Unicode, there are still enough improvements from Delphi 7 and earlier to make it worthwhile to finally jump.

lkessler
+4  A: 

2 things. The stability is much better than 2006 and 2007. (Not to mention it installs faster, runs faster, and isn't full of nasty memory leaks that eat up hundreds of megs of RAM.) That alone is worth ditching either of the last two versions for. But as for the language improvements, there's a lot to talk about, and it's been talked about plenty, but for me the crown jewel is the generic support, and especially the new built-in Generics.Collections unit. Finally, no more of this ugly idiom that we're all familiar with:

for i := 0 to myObjectList.Count - 1 do
begin
  currentObject := myObjectList[i] as TMyObjectType;
  currentObject.WhateverYoureDoingWithIt;
  ...
end;

Instead, if you declare MyObjectList as a generic-based TObjectList<TMyObjectType>, it takes care of type conversions for you, and it throws in a free enumerator (AKA iterator) as part of the package. Your loop now looks like this:

for currentObject in myObjectList do
begin
  currentObject.WhateverYoureDoingWithIt;
  ...
end;

Unicode and anonymous methods are nice, and Unicode especially may be essential for some people, but personally my favorite improvement is the end of ugly list access.

Mason Wheeler
+2  A: 

Nick Hodges posted:

Top Ten Reasons to Upgrade From Delphi 7

They include:

  1. Live Templates
  2. History Tab
  3. Dockable/Customizable IDE
  4. VCL Designer Guidelines
  5. New Tool Palette
  6. Refactoring
  7. Generics
  8. Anonymous Methods (Closures)
  9. Unicode Support
  10. Ribbon Controls

In his Conclusion he said: "the hardest part about writing this article was limiting it to only ten"

and then he lists 24 other things (not counting Intellimouse twice).

lkessler
+1  A: 

The by far most important incentive to me was the overall speed of the IDE in comparison with Delphi 2006 and the same project.

skamradt
+2  A: 

I just gave the Generic Collections and the enhanced For-loop a spin (don't mind the visual ugliness of the code (e.g. if-then-else on one line)):

program genericTList;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Generics.Collections;

var
  myList : TList<string>;
  s: string;

begin
  myList := TList<string>.create;
  try
    myList.Add('Peter');
    writeln('Inviting Peter');
    myList.Add('Barbie');
    writeln('Inviting Barbie');
    if myList.Contains('Bob') then writeln('Bob has managed to sneak in...') else writeln('Bob is not invited!');
    writeln('List of invited people:');
    for s in myList do writeln(s); //feels sooo goood X-)
    readln;
  finally
    FreeAndNil(myList);
  end;
end.

After three years of staying away from Delphi, which seemed dying back then, I think I might return to this lovely world.

My greatest Delphi project seems to suffer from not being Unicode-ready, but Unicode is great stuff too, so I'll just have to fix the code in few places. Yesterday I also managed to get it to build and execute without errors (seems there was some sort of D2007->D2009 transition trickery involved) and I noticed that D2009 is just EXCELLENTLY FAST! It's better than the older versions in (almost*) every aspect.

*I have not found regressions YET.

Peter Perháč
+1  A: 

Refactoring - extracting methods, moving classes around, extracting interfaces, operations which can improve code and design quality, are a very nice feature in newer versions of the IDE.

mjustin