Category Archives: Programming

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. http://en.wikipedia.org/wiki/Pascal_(programming_language )
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.

Advertisements