The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Delphi and Visual C++ comparison ?

Delphi and Visual C++ comparison:

Does anyone have insight on this? Or have links to related information. Thery both can create native win32 apps and both have RAD support. VC++ has larger user base while Delphi has better development environment. We are debuting about which one we should use to write our next desktop apps now. Please don't suggest .Net or Java, they are out of our options now. Thanks.
Saturday, April 08, 2006
Interesting choices. One question - which VC++? 6.0? Or the versions that come in Visual Studio 200x?

My choice: Delphi.

Visual C++ was the "gold standard" for serious SW development in the late 90s. The problem with VC++ is mainly productivity and poor design tool integration.

For instance, if you use MFC and the Classwizard, a design for a single application window is fractured into several components:

- Dialog layout (components in their positions on the form)
- One C++ representing the window
- A pile of constant ID declarations for controls, in a header file
- Clusters of "message map" definitions in the source code that tie the dialog controls to specific data variables.
- The modified "model-view-controller" design pattern that all MFC programs start with.

I am maintaining a VC++ app for a client and it shocked me to revisit how much scattered CRAP there is to deal with in a VC++ application, and how convoluted the UI creation process is.

Delphi is a true RAD environment that compiles to single executables, if you so wish. You drop controls on forms, attach event handlers to controls, and you do not worrry about a messy programming infrastructure that borrows from traditional C based Windows API, as VC++ does.

I would estimate the productivity increase of Delphi over VC++ (either new coding or maintenance) to be a factor of 2 to 5, seriously.

Lastly: Delphi's language and IDE design was more or less the basis for the .Net languages and their desktop incarnations. Everyone now spooges about how great .Net is, but Delphi was the original!
Bored Bystander Send private email
Saturday, April 08, 2006
Warning: I'm not a C or C++ developer, but I have years of Delphi experience.  I'm kind of a Delphi evangelist.

However, speaking with people who DO have both C/C++ and Delphi experience, and from my own experience trying to learn C and C++, my observations are:

C has some cool stuff Delphi doesn't, primarily in being able to make your code more "compact:"

For example, to increment a counter:


i := 1 + 1;





However, this ability to compact things can also be a factor in readability.  MANY people I talk with complain about the denseness of C code, and they say that this leads to decreases in productivity and increases in errors.  For example:


While i < 50 do begin
  <some stuff>;
  Inc(i);  // (or i := i + 1;)


While(i, i<50, i++)
 <some stuff>

I probably have the loop syntax wrong here - sorry.

The point is that Delphi forces a self-documenting code style - it is very easy to tell in the above example where the loop starts and ends, but in a more complex example the C example becomes more and more difficult to follow.

Other "compactness enabling" "features" of C make it possible to create code - indeed they encourage this - that is extremely compact but also extremely difficult to decipher.  Delphi, on the other hand, encourages code that is not more compact but is much more readable.  Note that by "less compact" I do NOT mean "executes more slowly" or "results in a larger executable."  Delphi app execution speed is virtually indistinguishable from C execution speed, and you can compile/link executables written in Delphi which are the same size as C executables.

I'm sure other Delphi zealots will chime in with other examples.

Another poster, in your original post about this, said you were afraid of pointers.  I didn't get that from your original posts or replies so I don't know how she got that, but ... this is another example of where Delphi helps you.

Pointers can be a very good thing for executing code, but zillions of hard-to-debug errors have been introduced into C/C++ code by inappropriate use of pointers.  Delphi uses pointers a lot too, but the Delphi language insulates you from the pointers without introducing any (or hardly any) execution overhead.  This is a good thing: the Delphi programming language does what it should, which is to make it easier and faster for developers to write readable, quickly executing, maintainable code.  C/C++ does not.

I think those last two sentences best summarize the advantage of Delphi over C/C++.

You may or may not know, but I'll tell you anyway :)  Delphi is actually Object Pascal with a high-performance and rapid-development IDE.  Pascal was invented by Niklaus Wirth (sp?) as a teaching language, and as such he developed it to be very self documenting and easy to use.  Because of these attributes it has become an extremely popular and productive language, and Borland made it into an extremely productive development environment.

These comments only speak to the utility of the C/C++ languages vs. Object Pascal.

As far as Delphi vs C++ in Visual Studio (which is what you were really asking about even if you didn't know you were), these two DEVELOPMENT ENVIRONMENTS are also very different.  When you start the Delphi environment you see a very clean, compact environment.  They use tabs for different classes of controls to drop onto forms, and everything is laid out in an extremely logical and useful fashion.  My experience with VS is that its design is nowhere near as clean as Delphi's.  You have lots, and lots, and lots of windows to contend with, the editing area by default is only about half that of Delphi's, and the way they make you access different elements of your project seems to me to be nowhere near as logical.  In my mind, Delphi's development environment is far more usable than VS.

Hope this helps ...
Karl Perry Send private email
Saturday, April 08, 2006
What's up with these selfproclaimed evangelists who do not have a good understanding of the languages involved?

Why can't people stick to topics they actually know about?

Delphi definitely has advantages over C++, but they are not the ones you mention.
Saturday, April 08, 2006
Your original question said "We are debating...", which implies multiple participants in the development. If any of your team have strong skills in a particular environment, go that way. Developer talent makes more of a difference to project success than picking between two similarly capable languages.

If there's no existing skills to draw on, and this is a greenfield project, with no code baggage, and those two languages are your only  choices, and all other things being equal, I'd go for Visual C++.

One simple reason: Delphi is a dead end. I totally agree with Joel's call on this -- -- the talent has left the building.
Andrew Lighten Send private email
Saturday, April 08, 2006
Wow, Jeb - thanks for setting me straight.  I'll be sure to use your knowledgeable comparison from now on instead of my ignorant ...

... wait a minute, you didn't offer any comparisons either way.  You simply insulted me.
Karl Perry Send private email
Saturday, April 08, 2006
I didn't attack you personally; it's just that I think your post contains hardly any accurate information. That had to be said.

Everybody wants to help, and that is a good thing, however, spreading wrong information doesn't help anybody.

If you are not experienced with C++ (you said so yourself), how can you be qualified to give advice? Every language has advantages and disadvantages, but you have to know both in order to make a comparison between the two.

Many of the articles you read online that explain why [language a] is a toy language, and that real programmers use [insert b] are almost always biased towards because the author has extensive experience with one language and hardly knows the other.

I didn't elaborate on the issue because BB already covered the question nicely.

When choosing a language I consider:
a) the merits of the language
b) the quality of the IDE
c) the quality of the libraries

a) Delphi and are both mature and suitable languages for win32 GUI development. Delphi is less 'powerful' than C++ in the sense that it doesn't have multiple inheritance, templates and such. Delphi has a native string type, which is nice. Unicode is a bit of a pain in both languages. Delphi compiles a lot faster than C++. Despite all that I find C++ much more pleasant to work with. Delphi allows me to get work done fast.

b) I think Visual Studio is great for GUI C++ development, but as mentioned there are a few problems. Intellisense is bugged, the STL version shipped with any version of Visual studio (up to 2005) is broken, etc. Visual Studio has a decent interactive forms designer, but it doesn't have as many features as Delphi does. For instance, menus and toolbars are hardly supported by VS. I think the debugger in VS is superior to the one in Delphi - Delphi can put you on the wrong track sometimes. This is highly subjective, of course. Delphi is hard to debug when 'Optimization' is turned on which can be annoying if problems occur only with optimization on.

c) MFC can be really rotten to work with, but it's very well documented and there are more freely available custom controls and reference materials for MFC than for Delphi. MFC is consistent in its own wicked way, but in this day and age I would not use it voluntarily. BB’s rant is spot on. For C++ you can also use ATL/WTL for GUI development, which works remarkably well. WTL doesn’t get in the way and it’s a great wrapper for the Win32 API. You also get tight and fast executables, but the price you pay is significant: you have to do a *lot* of template scaffolding. WTL is no longer officially supported by MS.
Delphi has the VCL, which is quite decent. It does get in your way sometimes.. but all libraries do. It does allow for RAPID application development, and it's in my opinion a bit easier to learn than MFC and a great deal easier than WTL.

Both environments have been used successfully to deploy applications, so it's very much a matter of personal preference. Microsoft does not care a lot about MFC anymore, and I think Delphi has gone downhill since version 7.

All in all, I would recommend Delphi. But I should add that I am highly unqualified to give advice to anybody.
Saturday, April 08, 2006
I was a C/C++ developer for years.  When I found Delphi, I did not look back.  Main reasons:  very productive environment and very fast compilation.  When I did C++, the compile/link cycle was not very good.  I really don't know if C++ has improved significantly in that regard.  It's been 10 years since I did much C++.

Personally, I don't care to compare silly language syntax differences.  You're a programmer so deal with it!  The customers never see the code.  They see the product.  I heard a .NET user group leader recently rant about how awful C# is.  His main complaint was about curly braces!  Well he's also a dyed in the wool VB programmer.  Complaining about curly braces is pretty silly.  It's only one character after all.

If you want to develop Win32, which is likely to be around for years to come, Delphi is a terrific choice.  Until there is something better, I have no reason or inclination to switch.  And that's not zealot-talk.  Believe me, I would much rather use one IDE for all my work.  I currently use VS for web stuff and Delphi for desktop stuff.  I have no contract with anyone to keep shelling out hard earned dollars for components and upgrades for both Delphi and VS.  But the desktop app alternatives are simply not as good as Delphi (in my opinion).
Mike Stephenson Send private email
Saturday, April 08, 2006
re "Delphi is a dead end", it's worth noting that Delphi for .NET exists.  So, should you want to port to .NET at a later date, that might help.

(Of course, there's also C++/CLI or whaterver the latest managed C++ is called).

You don't mention why you're interested in C++.  If you actually need C++ language features that are not in Delphi (e.g. you want to do some serious stuff with multiple inheritance or templates) then check out Borland C++ Builder, which is just Delphi with C++ as the language.  (I persume Borland still make it, I'm a little out of touch with the Borland world these days).

You you do not need fancy language features that only exist in C++, then I'd definitly vote for Delphi, for all the reasons others have noted above.  I used it for about 5 years and it was great.
John Rusk Send private email
Saturday, April 08, 2006
Delphi 2006 Suite includes Delphi Win32 compiler, Delphi.NET, C++, and C#.

I think the subject of whether a language should even have multiple inheritance is kind of religious/much debated issue.  See, e.g.,

FWIW you can do many of the things you would otherwise do with multiple inheritance by using interfaces in Delphi, just as you would in Java or C#.

Also, there is even a way to use something very much like C++ templates in Delphi.  I've heard reports from several developers who very much like this approach, described at:,1410,27603,00.html

I've never done any real programming in C++.  My feeling is that Delphi is a little bit higher level (i.e., has slightly more built-in abstractions, like the native string type).  Also, I expect that memory management is quite a bit easier in Delphi than C++.  And the IDE and the way it works seamlessly with Borland and the many excellent third-party components supercharges development; as someone else said the Delphi IDE and framework were the inspiration for .NET's.
Herbert Sitz Send private email
Saturday, April 08, 2006
Just for information of those who keep repeating "Delphi does not support multiple inheritance", Delphi actually supports interfaces, which are essentially multiple inheritance without the associated hassles. Generally MI falls into two kinds, one which allows inheriting from multiple implemented classes (C++) and one which allows only inheriting from multiple abstract interfaces (Object Pascal, Java). It's the former that's the one that has all the problems with ungraceful name conflicts.
Sunday, April 09, 2006
I'm using both environments. 95% of my time are spent in VC, 5% in Delphi. That said, I'm still way faster developing new stuff with Delphi than with VC...


1. The compiler is so fast, so that "experimenting" is made easy, especially when trying to figure out new stuff.

2. The langugage is more readable, even though I do consider myself a pretty decent C++ programmer.

3. The runtime library saves a lot of time. Lots of times you get things right if you just guess what a function does. "GetCurrentDir, DateTimeToStr, Now" are not really hard to guess, are they?

4. You get the VCL sourcecode, and it's pretty easy to understand. Compare that with reading through the MFC-sources...

Delphi has a few drawbacks, too. Borland has neglected it for too long, but now things are looking better since the new "DevCo" can really look after their baby and not be constrained in any way by Borland's ALM visions...
I guess a lot of it depends on what kind of software is going to be written. It wouldn't make much sense to write a game in Delphi, but for client/server database stuff there's no better tool out there, IMO.
Fritz Huber Send private email
Sunday, April 09, 2006
Oh, and what I forgot is that it is A LOT easier to get help on Delphi related stuff. Lots of time it's very hard to find qualified information about MS-technologies. Sure, there's lots of information available, but you have to cut through a lot of crap until you get the information you need. When asking Delphi things, I (almost) always find the answer right away just googling stuff up.
Fritz Huber Send private email
Sunday, April 09, 2006
We're using Borland C++ with the VCL.

VCL, nice UI, shame about the single inheritance which makes doing proper mixin based designs hard work. Hack round that, everything's peachy.

The IDE is SHOCKING. It's like they stopped bugfixing it at version 1. Decent sized projects can expect the IDE crashing out from under them 3 or 4 times a day. The debugger is particularly prone to issues and corrupted debugger symbol files can cause crashes that will lock up Windows XP.

Some days every other link will not work and not work in such a way that the IDE needs restarting before it'll work again. That's no exageration -- and for once it's not me -- we have 4 people using BCB and we're all having the same issues.

The command line compiler is blazingly fast but its error reporting is... ah... a bit petulant at times (especially if you're used to something like G++) and the project->makefile converter would cause saints to swear.

The compiler has some fairly egrarious bugs in it; mostly concerning the behaviour of templates, but it does compile and work with not only STL but the bits of Boost we threw at it as well.

The project management sucks, bites, blows, chews AND spews all at the same time. Really. However annoying make is to configure, at least you can there fix things. The PM regularly simply can't work out what order to build things in and leaves you to manually resolve stuff. In particular; it's incapable of working out that EXEs depend on their statically linked LIBs and hence it needs to remake the EXEs after redoing the LIBs. It will quite happily ignore this and then will let you debug the thing using new source code but old binaries...

What I can't quite work out is what they've been doing for the past decade. VS has only just now caught up with the VCL for UI design work {MFC does not come even nearly close} but Borland appears to have been completely distracted while that was happening.

The underlying tools are pretty good, but it's completely and utterly let down by a shocking UI and buggy IDE.

Frankly, if I was starting a new project targetted only at Windows, I really would just go with VC++ (complex bits) and C# (ui bits) unless there's a reason not to. Borland's stuff is nice, but they just keep putting it down and forgetting about it for years and years and they're being overtaken because of it.
Katie Lucas
Sunday, April 09, 2006

What version of C++ Builder are you using?
Sunday, April 09, 2006
Unless things have changed dramatically, there is nothing RAD about creating WIN32 apps in VC. AFAIK, you still have to use that POS Class Wizard for MFC, correct?

In any case, I think a more reasonable comparison is Delphi vs. Visual Basic 6. You can produce some very nice looking apps with VB6 + Infragistics (or other component suite).

If you must have RAD, then why are you even considering MFC?

I won’t go into the specifics concerning Delphi the language vs. C++. C++ is far more powerful and has been for years. That’s clear.

What Delphi gives you is the VCL, a RAD framework that is very well thought out and powerful, without requiring any kind of installable runtime. Furthermore, there are numerous VCL component vendors offering everything from Internet protocol support to XP Themes. It’s all there and the best thing about it is you can compile everything into the EXE. So, depending on which components you use (and the runtimes they require), you can limit your DLL-hell vulnerability.

However, there is a certain amount of risk in selecting Delphi at this point. Borland is in a state of transition and it is not clear what will happen with the IDE business. There is talk regarding the new “DevCo,” but most of that is speculation with a good dose of wishful thinking sprinkled on top for good measure. The reality of the matter is the new owners will have complete control of the business, and they can do anything they desire, including sending the IDE business to the chopshop. Of course, there are quite a few VCL component vendors who have a vested interest in seeing the IDE business survive. If DevCo decides to kill Delphi, I would not be surprised if they gathered their resources together and made an offer.

If you do not need RAD, there are other options for C++/WIN32 frameworks. Here are a couple:
MBJ Send private email
Sunday, April 09, 2006
> What version of C++ Builder are you using?

Does it really matter?

It C++ Builder is as buggy as was described, it looks like a seriously broken piece of software to me.
Jussi Jumppanen
Sunday, April 09, 2006
I never used Delphi but used C++ Builder 6 and honestly have to say I prefer Visual C++.

Builder is nice for quick prototype stuff, but I never really liked the way events are handled (button_OnClick, button_OnMouseOver) and the IDE itself for code is a pain to use compared to VC. I may be biased here, but I trully hate having to create code on C++ Builder. It doesn't indent correctly, Intellisense (or whatever the Borland name is) doesn't work as it should, and it is hard to navigate through the code to various files and declarations on it.

Also, VC has WholeTomato Visual Assist (http://www.wholetomato) which is probably one of the most time saving add-ins I ever used.

About the compile times, maybe Delphi is a lot better, but the C++ compiler isn't that much faster than VC on my pc.

And as MJB mentioned, there are other libraries you can use for UI. I personally love wxWidgets ( It is extremelly well done and simple to use.
Bruno Sousa Send private email
Monday, April 10, 2006
Version 6.1

My problem with it really is that I started using  Delphi when it came out; version 1.0.0 and back then it was a whole revelation.

VC++ absolutely stank and VB was such a shocking mess at version 3.

Compared to that, the VCL was "the world done properly" and we wrote software in it at storming rates. Come back to it the thick end of a decade and five versions later and, well.. the VCL still works fine. But the IDE still acts like it's running on Win3.11 complete with HUGE load times and flaky internal protection errors and everything.

I'm /disappointed/ more than anything else than Borland can have had a decade lead and thrown it away doing goodness knows what.

As for indenting; still, after all these years, nothing indents properly except Emacs.
Katie Lucas
Monday, April 10, 2006
MJB is a coffee brand. I'm MBJ. ;-)

A lot of people are happy with Builder 5 w/ SP1. Builder 6 was not a compelling upgrade for me. I think BDS 2006 might be a great product for micro-ISVs, but I'm holding off until the fate of "DevCo" is clear.

The biggest problems with the older Builder versions are, IMO:

The included STL version sucked.
The project manager sucked.
The C++ compiler is not as compliant as VC (later versions).

One thing that always bothered me about Delphi/C++ Builder in general is, if you create a DLL that uses VCL, it exports EVERYTHING. For security reasons, you might not want to export everything.
MBJ Send private email
Monday, April 10, 2006
Sorry MBJ, must be the caffeine addiction playing with the subconscious mind.

Katie, have you checked either Visual Assist or the new versions of VC (namely 2005 or Express which is free so no reason not to)? Just about everything in code formatting can be customized to suit your needs, and it works pretty well, at least the way I like my code formatted, VC handles it pretty well, except when VC creates the code itself (new classes, class implementation from Class Diagram).

I'm currently using Express version of Web Developer, and except for the lack of add-in support, I'm pretty happy with the entire IDE in general, and I'm sure I would be too with the C++ one if I could use Visual Assist in it.
Bruno Sousa Send private email
Monday, April 10, 2006
Katie -- CBuilder 6.1?

AFAIK there is no Borland CBuilder 6.1. We are a CBuilder shop & have to agree that the IDE is buggy; we often compile from from IDE & get no .exe at the end meaning that we often use command line compilation for full builds. Borland lagged C++ development behind the Delphi products and I think it shows in CB5 to CB6.

We now have Delphi 2006 which comes with C# and C++ and thus replaces CB6. It is far better; more stable and streets ahead in terms of the IDE.

My language of choice given the requirements in the first post of this thread would be Delphi 2006.
Grant Send private email
Tuesday, April 11, 2006
I've been using C++ Builder v5 for a few years now and it has been very stable.  I'm just making the move to BCB2006, which appears to be a e worthwhile upgrade.

Regarding whether to use VC++ or Delphi - I'd say you would be far more productive in Delphi, but, and it's a big but, the jobs market for Delphi/BCB is small in comparison.
Orson Kart
Wednesday, April 12, 2006
We've decided to use Visual C++. Major reasons:

1. job perspective, Delphi/BCB's market are very small.
2. uncertainty of the future of Borland's IDE business.
3. no need to buy Delphi license, we already have VS2005

After tried both, we knew Delphi is a far more advanced RAD than VC, but above reasons which are unrelated to the technologies have us to move to the VC.

Now, any suggestions on books for VC++/MFC. Some one told us that  Jeff Prosise's Programming Windows With MFC is a very good one,

any other?
Thursday, April 13, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz