Delphi vs C#

Icon_Delphi Recently a very interesting discussion was going in LinkedIn forums regarding choosing Delphi programming language versus VB or C#. Here I will repost one comment because I agree on it 100% :).

Phil Caetano (Senior Programmer at Flairbase) wrote:

Why Delphi?
1) Ease of programming.
This is pascal, one of the easier languages to learn. Very old language too and was used as a teaching language. This makes it easy for anyone to learn. )
2) Component based Programming.
There is quite a large base of components available, free or paid that allows you concentrate on the "Core" of your application and not the little other details like how to connect a database.
3) No Dependency!!!
C# has the Framework that it depends on. An application compiled in Delphi has none by default. Even components used don’t create an external dependency. In C#, all the 3rd party components have to be included and some even have to be registered in the GAC (That on its own is a problem)
4) Easy Database Support.
Since the beginning Delphi has always had Database support. Many other components exist that expanded off that base. You can program using BDE (Please don’t), ADO, SQL, MSSQL, SQLite, MySQL, Interbase/Firebird just about any database (Except Compact SQL, very limited). And there is even Components that allow you design your entire application "Database independent" Which allows you to switch from MS SQL to Oracle with just a connection setting. (Provided the sql syntax is compatible)
5) Low Memory usage.
If you compare to C#, or VB. You’ll see a simple Hello World will require more memory than Delphi. This is usually not that important for Desktop software, but can be!
6) Small Foot Print.
Your compiled result is your application. No 300 megs download library, or QT, mingw, etc. It compiles into just a few megs.
7) Native SPEED.
Yes, we can debate speed vs C++ or .Net and what you define fast. But overall, it is mostly faster than .NET apps.
8) Believe it or not, Cross Platform!
Yes Free Pascal that is. Sure Delphi doesn’t do it anymore (Kylix), but the time you spend in learning Delphi is not a waste, since your knowledge can be used with Free Pascal and you can have a Linux, Mac and others.
9) Known Factor. (Not sure how to word that)
But in C# for example, you just NEVER EVER know when the Garbage collector will trigger or if a framework update will break your code/security, or as it happened with me, some other application installed and broke the .NET GAC, causing my application to no longer work.

Why not use Delphi? Versus C# (Since this is what MS Pushes)

1) No Garbage collector.
(Yes, this can be debated on its usefulness, but in the end its still a missing feature and useful)
2) No 64 Compiler!
THIS BLOWS ME MIND. Free Pascal has it, many of the other languages have it, but yet. Delphi is still sitting on 32. Most desktop application will not need 64 bit. But 64 has been around for quite some time now and yet no 64 compile.
3) Shrinking User base
SHhhhh don’t say it too loud, but sadly, C# is stealing programmers away. I’m not talking huge numbers, but all the fuss about C# and .NET makes decision makers think its the best thing since slice bread. Which leads to less updates in Components or new Components released. Seen companies drop Delphi and go .NET only components. Always buy the source!!
4) The Tossing game.
What is the tossing game? I’m referring to the Borland/Imprise tossing it to CodeGear, which now is tossed (bought) by Embarcadero. I’m sure they will do good stuff with it. But in the end, it just doesn’t look good.

Anyhow, I prefer Delphi, but its just a language in the end, the end user will most likely not know what you used.


Nice comment Phil. And I’m also waiting for 64bit.


7 responses to “Delphi vs C#

  • Linas

    100% agreed. And it is very pleasant to see that now Delphi evolves steadily.

  • manaaar

    ease < hard understand and learn..
    VC# DELPHI C++
    i know both language visual and delphi
    and i prefer delphi coz it for native win32 app
    visual depends on net (only not c++) and its realy bad thing..

    • mzemaitis

      What I more and more do not like about .NET all the version files on my PC. Now is the 4 version.
      I’ve got 1.0; 1.1; 2.0; 3.0; 4.0 and you can’t just use 4.0 version Arrrrrrrrgh, M$

  • Rahul Mathew

    k…….guys…………as a programmer who migrated from VB6 TO C++ TO JAVA TO .NET TO DELPHI………..i would like to comment…

    Delphi now has a 64-bit compiler…checkout Embacadero XE ..there is even a video on it…

    It has Office ribbon control….(which C# and Java Swing not have )..only MFC has it

    It has CoolBar or its also called ReBar ….(which C# and Java Swing have not )..only MFC and VB6 have

    It has a ControlBar……toolbar which u see in Adobe Acrobat 6.0 and 7.0 Professional…

    C# …Professional Color Table to customize MenuStrip…sucks…still slow..flickering…

    Delphi has….different ways ways to do that …using TActionMenuBar….etc…

    u can skin ur application, HD Support , 3D Support ….in Embacadero Delphi XE 2

    Delphi…..was used to maked Driver Checker,Alcohol 120% , Spyware Doctor…..DVD Convertor…… promotes c# but they dont make office applications with c# they use MFC…

    U can directly call win 32 api ….no need to find its delphi equivalent…like what we do in c#…

    Delphi is also object oriented….it has tons and tons of controls…that will blow ur head….no pain in the neck….any more….

    ……of course old versions of delphi…had bugs….no more….

    My friendly programmers …..either u can go for a lang which is easy to learn or u can go for a lang which is raw power

  • Ciprian

    @Rahul Mathew
    You seem to love Delphi XE2. I’m programmer in both C# and Delphi and I do agree the original post: both have their strengths (even I would disagree to some), yet for me working with C# is easier from services standpoint:
    – XAML is declarative way to write code with low mistake rate. I can use an XML editor to do it, or SharpDevelop for that matter
    – GC for complex code is somewhat better to have, at least compared with Delphi that does not offer RAII (obj:= TClass.Create(…); try … finally obj.Free; end; is best practice yet is really annoying)
    – for big codebases there is a subpar static code checker (I’m fond of ReSharper). No Castallia is not by far a similar thing, yet is a step in a good direction. Even C++/Objective C will have it via LLVM in tools like Qt Creator
    – Delphi generates bad code, fairly slow. FireMonkey (VgScene) is a step in good direction as it removes some CPU instructions, yet it generates code that is slower than C#/.Net code generator, in the class with Mono code generator. It is hard to write a complex editor in Delphi for this matter alone, is better to use Qt for that matter
    – for beginners it has a huge entry price. SharpDevelop can compile last version of your projects without paying a penny. Even without Bizspark, Visual Studio Standard can get as low as 400 dollars (compared with 200.dollars Starter Edition). I did not say a thing about Lazarus as SharpDevelop loads your projects and you can work with them after, when Delphi and Lazarus are compatible at the language level, but all other tooling have to be written twice.

  • codevark

    I’ve been coding in Delphi since D3 (we switched from PAL!) when working on desktop database apps that helped create some of the first ecommerce websites back in the mid ’90s. Now working with RAD Studio XE4 doing gnarly scientific programming, and it’s very nice. (In fact, I think the IDE is actually VS rebranded because once it crashed and I got a dialog that said “Visual Studio has encountered an unknown error and needs to close.” 🙂 We’re also about to get into a heap of C# programming (and I’m interested in non-VS ways to do this, because M$ wants each developer to have a $1200 VS+MSDN subscription! blechh)

    There are some things about Delphi I really like; maybe something like them are available in other languages, maybe not. One of them is the TClientDataSet which is IMHO da ballz. FWIW, I did a lot of Amiga programming (which I’m sorry leaves any of these wintel things in the dust as far as performance); one of the guys (Eddie Churchill) who developed CanDo (the first graphical IDE for the Amiga) went to work for Borland and Delphi shows some of that heritage, and one of the main Turbo Pascal and Delphi designers (Anders Hejlsberg) went to work for M$, and C# shows a lot of that heritage. Each language has it strong and weak points, and best use cases. Use what works for you, have fun, code your frickin brains out!

  • ulymar

    I love delphi for win32 applications… no hasle for deployment…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: