Hello .NET, D Here Calling
Steven Schveighoffer
schveiguy at yahoo.com
Mon Dec 22 14:28:47 PST 2008
"bearophile" wrote
> - But is the dotnet able to support all things D supports? For example can
> you implement unions? Inline Asm code? How about the interface with
> compiled C code? Etc.
C++.net works just fine, and supports unions, etc. Anything that C++
supports. The difference is that you mark code that can be compiled into
CLR and code that cannot. This provides a somewhat simple bridge between
.NET and standard C functions. Most likely, D.net would be the same way.
Asking if .net can support everything that D does is like asking if C can
support everything that D does. You can call C functions from D, even write
D functions that are callable from C, but you don't write D code in C.
> - One of the advantages of D, that is it produces true compiled
> executables, is lost here.
> - I think performance on dotnet can be good enough for most programs, but
> a good C++-grade compiler like LLVM (LDC) can sometimes give even more
> running speed.
What is the advantage you see here? Visual studio produces .exe files from
my C# projects, which run just like normal executables. They perform just
as well as C++ programs as far as I can tell. As far as I'm concerned, they
*are* compiled executables. Who cares if they are morphed into native
binary code when I run them?
> - C# is not that far from D, and it has several advantages (named
> arguments, better lambda, is much more widely used, more built-in
> reflection, LINQ, a way to support duck typing, run-time compilation of
> code, etc etc), so how can D compete with C#? While I can see how normal
> compiled D may compete with C# in some lower level niche, I don't see yet
> how D.net may compete with C#. What has D# to offer over C#? Maybe
> nothing?
I think D's syntax is far superior to C# (save some C# features such as
properties). However, I do see issues with how to make D conform to .net
without affecting the syntax benefits. For example, how do you call .net
functions with D arrays? .net arrays are classes, whereas D arrays are
structs. If you have to use .net arrays instead of D arrays in order to use
D.net, that would be a deal-killer for me.
-Steve
More information about the Digitalmars-d
mailing list