D vs. C#

David Brown dlang at davidb.org
Sat Oct 20 19:58:32 PDT 2007


On Sat, Oct 20, 2007 at 04:49:39PM -0400, Mike wrote:

> 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!

A couple of comparisons I can think of.

  - D does nested classes "right".  C# requires you to explicitly put the
    parent class as a field in the child class, which is clumsy.

  - C# generics (recent versions that have them) are true strongly-checked
    generics.  Somewhat less flexible than templates, but less prone to
    strange errors.  Some people find them more difficult to understand, I
    find them clearer.

  - C# has a stronger separation of managed and unmanaged (gc or not) data.
    It is more work to call C functions, and it isn't as good at
    manipulating data structures directly.

  - The .NET libraries are much richer, a lot more like Tango.

Dave



More information about the Digitalmars-d mailing list