Re: Delphi and C++Builder



"Sandeep Chandra" <sandeep_c24@xxxxxxxxx> wrote in message news:4678862d@xxxxxxxxxxxxxxxxxxxxxxxxx
Are there any advantages to using C++Builder instead of Delphi when writing VCL applications?

Are there any advantages to using C++Builder at all?

Regards

Sandeep

The main issue is that C++ Builder programs run using a large slab of Pascal compiled code called the VCL, and this heavily influences the experience you get with C++ Builder vs. Delphi.

C++ Builder contains defines and compiler extensions to make it hook up to the Delphi VCL and Pascal compiled code and can even compile Pascal source! This "two language" issue is significant. For example, exceptions are converted from Delphi to C++ exceptions - by some interesting RTL code. A large number of C++ Builder users do not come to terms with the two language issue- consequently I see Builder code on the internet with broken error handling and memory leaks.

If you write Builder apps where you use a few controls to display text and graphics and do a lot of processing in C++, then you can mostly pretend there is no Pascal. However, once you go deeper, inheriting from the classes in the VCL and writing your own classes to display information in tailored ways, then you are involved intimately with the VCL Pascal source code and the last thing you need is a language conversion issue. That is probably why most commercial and open source components for Builder and Delphi are actually written with Delphi.

If you have a large committment to C++ as libraries you have written, or need to work with C++ programmers, or are learning C++ for your career, or have an abiding love affair with the C++ language, then this will influence your decision. Personally, if I needed a lot of C++ processing, I put it in a DLL and call it from a Delphi program.

If you just want the best, safest, fastest tool, particularly for desktop apps, or sell your compiled programs for money, go for Delphi.

If you believe C++ is a better language than Delphi, just check that you have tried both. A decade ago, I was a C++ programmer who thought Delphi was a toy. There was no C++ Builder then, or I would have used it. When I was forced to use Delphi for a joint project I a got a shock - my productivity and code quality was higher than I had experienced in C++. Having learned C++, I found Delphi easy to learn.

If you really want C++, then Builder is OK.

Roger Lascelles



.



Relevant Pages

  • Re: Wheres the reviews of Delphi 8?
    ... Right click in the code editor and you ... the recent BDN article) works perfectly, which means that Delphi can ... use non-VCL visual components with VCL projects easily. ... Builder - you don't need a registration unit. ...
    (borland.public.delphi.non-technical)
  • Re: Stuff going on at the BDNRadio show.
    ... There would be no VCL included, so you would have to write all the code raw, ala C++. ... Only code that wouldn't stand much of a chance with a preview compiler would be VCL based, ... A Java shop can switch to any Java IDE without any negative effect on their codebase, not so for Delphi. ...
    (borland.public.delphi.non-technical)
  • Re: borland vs. microsoft
    ... > in this language known as Object Pascal. ... I've never heard of Object Pascal except with Delphi ... > the more blatant mistakes is when defining AnsiString support in VCL ... I haven't used the free compiler much but I think it's cool that they were one ...
    (comp.lang.cpp)
  • Re: Unicode support in Dexter?
    ... > Why bother? ... Because it takes a lot of time and effort to write a new compiler, VCL, ... C++ with MFC instead of Delphi with VCL, ...
    (borland.public.delphi.non-technical)
  • Re: The 64-bit Strategy Session commence.
    ... C++ is the most likely candidate, however Fortran also already have ... .Net with XAML looks like a viable alternative to VCL + DFM ... The value of Delphi for me was in the VCL, the compiler, third-party ...
    (borland.public.delphi.non-technical)