Feq questions about the D language

bearophile bearophileHUGS at lycos.com
Sat Mar 10 06:01:22 PST 2012


> I'm a C# programmer who wants to start using D as well for
> various reasons.

Welcome here and to D then.


> Is the official D compiler(DMD) matured enough
> to be used for writing 'heavy' applications? I mean, there is a
> bug tracker section for the compiler on this website and there
> are many 'major' and 'critical' bugs listed there and i'm not
> sure how much should i be concerned about them.

The DMD compiler is getting better and better, but I suggest to start with less serious applications for now. I don't suggest to use D/DMD for mission critical applications yet. It's also a matter of what you mean by "heavy application".

In Bugzilla DMD has several bugs, but I think the situation is acceptable for smaller and not critical programs.


> I played with D
> for a while and it feels a lot like C# which is obviously good
> for me.

But there are many small differences too, that you have to keep in mind, to avoid troubles. The differences are quite interesting. C# is a very well designed language, it contains only a quite small number of relevant warts/design mistakes.


> What about performance? Yeah, i know that D is a native
> language and theoretically should be faster than C#, but it's all
> about compiler/runtime implementations.

DMD back-end is not so advanced. Generally if you want high performance you have to take a look at the LDC2 D compiler, with LLVM back-ed (there is also GDC with GCC back-end).


> The Microsoft's .NET
> implementation nowadays produces extremely fast code.

The Microsoft's .NET avoids most obvious sources of inefficiencies, but clearly it is not obsessed with performance. The JavaVM, despite not supporting structs managed by value, has a more efficient GC, better escape analysis, better de-virtualization of virtual functions, and so on, and generally gives a higher performance than the dotnet. In theory D is able to be even better, but in practice it's a matter of quality of compiler implementation.


> Achieving similar performance in D compared to C# would be good
> enough for me.

In D there are several small things that are slower than C# compiled on the dotnet.


> Is there something like the System.Drawing available?

I have suggested a small portable graphics module in Phobos, but we are not there yet. There are external libs, based on GTK, Wx, etc.

Bye,
bearophile


More information about the Digitalmars-d mailing list