22

I'm coming from PHP and Python background with little knowledge of C, I have done many web based application now I'm thinking of Desktop application for windows platform.

A friend told me to go for Delphi and others are saying C# is the best, well, what I'm looking for is

  1. Simplicity
  2. Productivity
  3. Good API documentation
  4. Speed
  5. Drag and Drop
  6. Multi threading & Good Network API

Thanks

3
  • The guy who designed the Delphi Compiler also designed C# language - So C# borrows a lot from Delphi.
    – Gravity
    Apr 14 at 12:28
  • This book does a thorough comparison of Delphi vs C and C#. It also looks into things like compiler speed, memory management, cross-platform support, etc
    – Gravity
    Apr 14 at 12:53
  • Some people complain that Delphi is not good documented. The help file is delivered with delphi but you can also find it online. See for yourself: docwiki.embarcadero.com/Libraries/Sydney/en/Main_Page . Also, Delphi functions are cleaner than the MS API functions (number of parameters, parameter type, parameter names, etc).
    – Gravity
    Apr 14 at 12:58

4 Answers 4

24

Delphi, definitely:

  1. Simplicity - Delphi's syntax is based on Pascal, which was explicitly designed to be easy to learn, and it can deliver on that promise. C#'s is based on the C family, which... well... was not.
  2. Productivity - Delphi is a descendant of Turbo Pascal, and it still has the fastest compiler known to man, which will boost your productivity enormously. Plus it has the debugger Visual Studio wishes its debugger will be like when it grows up. Especially in the latest version of Delphi, debugging is much easier.
  3. Good API documentation - "API" is a pretty vague word these days, encompassing all sorts of things. I assume you mean libraries, and here it's sort of a tossup. Both the .NET framework and the Delphi standard libraries have good online documentation and mediocre, difficult-to-use offline documentation. (A consequence of the Delphi team choosing to use the same horrible help system as Visual Studio, which they will hopefully move away from in the next version.)
  4. Speed - Delphi wins easily. It compiles to native code (faster execution and much faster startup because there's no JIT phase,) and it doesn't use managed pointers so object access is faster and less cache-unfriendly.
  5. Drag and Drop - A built-in feature of the VCL.
  6. Multi threading - Delphi has a built in thread class, but if you want to do complex things with concurrency there are better options. Primoz Gabrijelcic, a Delphi community member, has been working on an excellent concurrency library that I've helped contribute to. It provides high-level support for common threading goals such as task pooling, parallel FOR loops and multi-stage pipeline processes.
  7. Good Network API - Delphi ships with Indy, a mature open-source library that makes Internet connections easy to set up and manage. We use it at work to provide the communications layer for an industry-leading app that you've probably never heard of unless you work in broadcast media.
  8. Deployment - This wasn't on your list, but it's worth mentioning. There are still systems out there that don't have the .NET framework preinstalled. By default, Delphi compiles its standard library into the EXE, then uses a smartlinker to remove parts you don't use, resulting in small EXEs that don't have dependencies on massive runtime libraries weighing in at hundreds of MBs that your users will have to download and install separately.
17
  • 2
    @Elf: There may be more C# jobs available, but there are also lots more people competing for them. Skilled Delphi developers don't have any trouble finding work. Dec 24, 2010 at 14:36
  • 5
    C# is not based only on C++, but also on Delphi and Java. I too learned programming in Pascal, and I see very much of it's philosophy in C#. Regarding managed pointers you have got that backwards, there is no overhead accessing data through managed pointers, and changing them is faster than in a system using reference counting.
    – Guffa
    Dec 24, 2010 at 17:20
  • 13
    Delphi syntax being easy to learn is a completely subjective statement. I was infuriated by Delphi syntax, and decided against learning it for that reason.
    – Tjaart
    Oct 22, 2012 at 9:51
  • 8
    -1 : This answer is biased like crazy. The Visual Studio debugger is at least as good if not better than Delphi. Delphi documentation is inexistant compared to MSDN being the best documentation ever. Oct 22, 2012 at 18:08
  • 4
    Deployment - total fail. Deplhi requires Windows, so that's a step backwards from C#. C# is portable and multiplatform thanks to Mono. Delphi is not. You don't need to buy Windows to run a program written in C# that doesn't use explicitly Win32 libraries. Simplicity - also failure. C#'s syntax is very easy to read, very concise, and easy to write. Delphi is not. API documentation - hell no! If I write "web service C#" I get tons of relevant results. No such things for Delphi. Speed, threading, especially the debugger - also false.
    – Alex
    Oct 29, 2013 at 2:45
16

C# generally is going to have a larger user base, more development in the future, and the tools for RAD development through Visual Studio are unbelievable.

  1. The syntax will be similar to that you used in PHP and C.
  2. Visual Studio with its tools and IntelliSense is extremely productive.
  3. MSDN
  4. Again, VS tools + Intellisense, but speed really comes from a familiarity of your language and its features.
  5. VS designer for WinForms, WPF.
  6. System.Threading and System.Net

I do not have much experience with Delphi, and I am just speaking about my experiences with C# in general. Where I work, I have extremely tight deadlines envisioned by non-programmers, and I am able to pump out line of business desktop applications extremely fast. In the last three weeks, I went from specification to deployment on two winforms LOB applications. The productivity for GUI development in C# with VS is just crazy.

9
  • 5
    Thanks, according to a post at daniweb.com/forums/thread54305.html, Win32 API integration and completness in Delphi surpasses even C
    – elf1984
    Dec 24, 2010 at 8:59
  • 2
    you should really look into Delphi if you think that C# is the ultimate development environment for creating desktop applications fast. I personally hate it when I have to create desktop stuff with visual studio, but nowadays I don't always have a choice (unfortunately). Dec 28, 2010 at 18:32
  • 1
    Visual Studio's RAD (form design) tools suck, frankly.
    – Warren P
    Jun 12, 2011 at 3:27
  • 1
    @WarrenP Could you please elaborate?
    – Tjaart
    Oct 22, 2012 at 9:47
  • 1
    Create server application in C# and Create desktop application in Delphi, because delphi produces native code which is harder to crack!
    – justyy
    Apr 28, 2014 at 10:46
13

Both have all 6 points you want but I feel C# has the edge on most if not all.

To go through the points:

  1. Delphi requires memory management, so you could argue that alone makes C# simpler. Accepted answer mentions syntax here, well C# syntax is similar to both PHP and Java, so if you want to get up and running quicker from either of those backgrounds, then C# has the edge.
  2. Productivity, I think you get more done quicker in C#. The .net library gives you so much that in the bad old days, I'd have to look to 3rd party delphi components to provide.
  3. Documentation, Delphi's was always good, MSDN is better, plus you will find a larger community for support, see my Stack Overflow anaylsis below.
  4. Speed, Delphi might have the edge on this, but assembly trumps all so that's not usually a good reason to pick a language. One thing I would point out is that I've heard people cite that C# is interpretted. It is not, it never has been, it has always had a JIT.
  5. Drag and drop, available on both.
  6. Multithreading, Delphi is good but C# is excellent with build in constructs like lock(){} parallel extensions, and the new await.

Extra point, the question title is GUI programming, for this I am a big fan of .nets WPF, which, the only thing Delphi had that was half way close was Bold, which was a pain to tame and now dead.

Community size, comparing the number of questions on this and Stack Overflow on both the Delphi and C# tags you will see that the size of the C# community is much larger.

Stack Overflow:

  • Delphi 17K
  • C# 367K
  • Java 312K
  • c 73K

I've added c, to show that's not a problem with the languages age and Java just for comparison.

I'm not a C# or Java fan boy, I was a big Delphi fan, professional pure Delphi developer for 7 years, but they really screwed it up from 2005 onwards with thier ill faited foray into .net which screwed up the stability of the IDE for even native 32 bit compilation. Delphi 7 was peak of the language in my view.

18
  • How about a reply with that downvote?
    – weston
    Oct 22, 2012 at 8:49
  • 1
    I am not the downvoter, but I would say that you are not answering the question. Your are just assessing Delphi's popularity on stackoverflow. You sure make a point, but it is IMHO quite minor. Being the only one to use a technology is not always a bad thing. Oct 22, 2012 at 8:55
  • @Simon fair point, I've now answered all points and integrated the analysis of the number of questions into a wider point about community size.
    – weston
    Oct 22, 2012 at 9:09
  • It could be argued that language that results in more questions is more complicated to use. ;-) How was Bold similar to WPF? I've used WPF and didn't see any similarities. Aug 27, 2013 at 15:48
  • 1
    @weston LiveBindings allow arbitrary binding of any object to any object. docwiki.embarcadero.com/RADStudio/XE4/en/… RE: Android, there are 900 Million Android devices. There are a lot of people really interested in developing for them - huge business need for that - especially since code can be shared between Android and iOS - better code sharing than any other native development tool (excluding JavaScript and HTML5 tools). Aug 28, 2013 at 0:07
7

When I was at uni, I was taught programming with Delphi. I am a bit rusty, but I am currently reading through a lot of Delphi code to port it to a C# application.

I much prefer the OO with functional leanings of C# over the procedural with OO leanings of Delphi. You should consider how you prefer to code when choosing between them. I don't think there is much in it when it comes to simplicity - just what you find easier. The same goes for productivity.

In terms of RAD (rapid application development) there is not much between winforms and Delphi GUI design. They remind me of each other.

WPF on the other hand is something I prefer over both for its declarative style.

I don't think there is much difference between the quality and coverage of vendor provided documentation for either C# or Delphi. I think that you will find more non-vendor information about C#, but that could just be because I've not really searched for much in the way of Delphi.

I've not had to do any threaded programming with Delphi, and any networking I did was years ago and I can't remember.

The .NET libraries for parallel processing, events and other threading work are good. So you won't be missing out there. There is a great deal of support when it comes to networking, so again highly recommended.

Overall I would go with C#/.NET. This is partly because of WPF, but also I prefer the code I write in C#. As far as I'm aware delphi doesn't have anything like Linq, which I find invaluable.

10
  • Thank you for your wonderful reply. which book did you read as a beginner? now i will be starting C# 4 and .NET 4 on VS 2010
    – elf1984
    Dec 24, 2010 at 12:04
  • 4
    Beware trying to port a Delphi app to C#. Every time I've heard of any company trying it, they've ended up validating every point Joel made in "Things You Should Never Do, Part 1" and it ended in disaster for the product and the company that owns it. Dec 24, 2010 at 12:34
  • Sorry, I can't really advise you on a beginners book for c#4. I'm not sure I had one when I started c# (back in the 1.1 days. I'm sure there were some, but I didn't read one). When I started I think the first book I used was Teach Yourself C++ in 21 Days by Jesse Liberty, which I read before I started uni. It took me ages to get through it, but I learned a lot. Another good book I had was Discover Delphi, that was the book for the course. A book I recommend is Object Thinking by David West, as it really gets you thinking about OOP and OOD, also Effective C# by Bill Wagner...
    – Matt Ellen
    Dec 24, 2010 at 12:51
  • ...They're not really beginners book, but once you have the fundamentals then they have great tips and advice on how to become a better programmer.
    – Matt Ellen
    Dec 24, 2010 at 12:52
  • BTW if you're looking for LINQ in Delphi, check out Alexandru Ciobanu's DeHL library. It provides LINQ-style collections and operators. LINQ syntax (the pseudo-SQL stuff) isn't in Delphi yet, but apparently the compiler team is working on it for a future release. Dec 24, 2010 at 15:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.