D vs. C#
Dave
Dave_member at pathlink.com
Sat Oct 20 18:20:30 PDT 2007
"Kyle Furlong" <kylefurlong at gmail.com> wrote in message
news:ffdqe7$pvi$1 at digitalmars.com...
> 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!
>>
>>
>> Many thanks in advance,
>> Mike
>
> C# provides all the niceties of a RAD IDE and a cohesive and very broad
> standard library. You get this at the price of performance. C# is not
> native, but runs in a VM like Java. While it does do some JITing, D and
> other compiled languages will always be faster.
>
> Additionally, I think D has a bit cleaner syntax, though C# is a huge step
> up from C++ in that respect.
>
> Oh, and if it matters to you, D templates and metaprogramming blow
> anything C# has out of the water, yielding the potential for even more
> performance increases.
D also supports inline asm, C-like pointer syntax (w/o C#'s 'unsafe' and
'fixed') and easy use of C lib. routines.
The price for most of that is a non-moving GC, but I think that those can be
developed to rival the speed of the moving GC's. D's built-in array slicing
mitigates a lot of the need for a super-fast GC as well.
More information about the Digitalmars-d
mailing list