D vs. C#

Bill Baxter dnewsgroup at billbaxter.com
Sat Oct 20 14:05:44 PDT 2007


Mike wrote:
> Hi,
> 
> I have some advanced knowledge of programming with C and C++.
> While I like C for its simplicity and speed, it lacks some important functionality (like OO). I'm not very fond of C++, since it is quite clumsy. (But you know all that already)
> 
> Anyway, I was looking for a new programming language for little projects. I looked into the specs of the D language and became quite fond of it. Anyway, I hear a lot of good things about C# as well.
> I am not experienced enough to compare the two simply on the basis of their specifications. I tried finding some comparison on the internet but failed to find anything more recent than from 2003.
> 
> I was wondering about the advantages of either and languages, and in which case one is more appropriate than the other and I hope you can help me out!

Choosing D over C# makes sense if
1) you care about getting every little last bit of performance out of 
your code
 
(http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=dlang&lang2=csharp)
or
2) you care about your apps not requiring a 20MB runtime/VM to work.

and maybe 3 -
3) you care about portability.  Though I think Mono makes it a non-issue?

Other than that, I haven't used C# but I hear good things too.  And 
obviously the community is much bigger, which translates to greater 
likelihood that someone will already have code you can steal that does 
some niche thing you need to do.  And Microsoft's C# development tools 
certainly knock D's out of the water.

oh and I forgot #4 reason to use D instead of C# --
4) you want to be one of the "cool" kids.  :-)

--bb



More information about the Digitalmars-d mailing list