Delphi vs C++ Builder
(ObjectPascal vs C++)
The purpose of this article is not to knock Delphi or any other programming language. If you have read about my programming background, you would have realized that the Pascal language have formed a large part of my programming experience. However at this moment in time I am enjoying programming in C++ very much and I would like to explain why I feel it is the language of choice today. Also note that I am not really comparing Delphi to C++ Builder as they are basically identical - the main difference is the language used.
Firstly when I was an Pascal/ObjectPascal programmer, all I heard about was that C/ C++ was powerful but also difficult to learn (maybe that's why it was so powerful). C/C++ in my mind became this mystical, all powerful language which only the ultimate programming guru could master. But because Pascal/ObjectPascal at the same time never seemed lacking, the C/C++ issue didn't bother me too much. When Delphi came along programming became even more of joy. The language (ObjectPascal) was easy and designing the user interface even easier. So why change to C++ Builder? Or C++ for that matter? Delphi is a great development tool; it is powerful and easy to use. I was pleased with Delphi because the language was ObjectPascal which I knew very well. Well as things are in life, just when one becomes content with what they are doing, something else comes along and stuffs up the whole issue. In my case it was university. I first year university we programmed in Pascal when any programming or algorithm analysis had to be done. Then in second year C++ was throw upon us and I decided it was best to give it a try. So I tried and very much to my surprise I found this very powerful, very difficult, guru only language, very easy. I fact I think the differences between ObjectPascal and C++ are fairly petty. The two main features that C++ has that Pascal doesn't are templates and multiple inheritance - both of which are tricky (not difficult) and powerful. But one of the wonderful things about programming is that one can achieve the same result in many different ways and I have yet to discover a task that could only be programmed using templates or multiple inheritance. So having said all this why do I prefer C++ to ObjectPascal? Well not because C++ is more powerful as such, (many would disagree) but because of the following reasons:
- C++ is the industry standard.
- there is therefore more support for C++ in terms of documentation, books, etc. For example, have you ever tried to find a book on writing games in ObjectPascal, not easy compared with C++ and it is not because one cannot write games in ObjectPascal. Also SDKs released are all written in and for the C++ language, eg DirectX SDK, ActiveX SDK. Another thing I found about C++ was that working with pointers was easier than in ObjectPascal mainly because I found more practical examples and better documentation on using pointers in C++ and pointers are more commonly used. Some may argue this is a bad thing, but I believe it is bad only for those who do not understand what they are really doing.
- there are many more versions of C++ available (compared to ObjectPascal) and therefore if I ever want to write a program on another platform besides Windows and therefore it would be easier to do so than with ObjectPascal.
- Java, possible the language of the future, is based on C++.
And that's basically why I feel C++ has the advantage over ObjectPascal, and therefore why I choose to program in C++ or C++Builder instead of Delphi. But at the same time if you do program in ObjectPascal, it is a great language and don't let those C++ gurus give you grief. Also don't forget that if you like I always wondered what this C++ is like, remember that C++ is not difficult (not any more than ObjectPascal) and that the transition from ObjectPascal to C++ in my experience was much easier than I thought. Best of luck with whatever language you decide to use.
This document was last modified 1 July 1997.