What are the worst parts of D?

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 25 00:34:10 PDT 2014


On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>
> What do you think are the worst parts of D?
>

Anything in the spec that depends on you having an x86 CPU, or 
being tied to a specific platform.

1) D Inline Assembler.
- First because suddenly to have a conformant compiler you need 
to implement an entire assembler, rather than doing the sensible 
thing and just offloading it to GAS or some other tool that can 
assemble the code for you.
- Second because it creates so many holes, like invalidates 
nothrow checks, allows jumps to skip over initialisations, etc.

2) __simd
- The gentlemans equivalent of asm { di 0xF30F58, v1, v2; }

3) va_argsave_t implementation
- The brainchild of "let's get it working, then pretty" when it 
came to porting DMD to 64bit.  Everyone else managed to support 
64bit va_list just fine for years without it.

4) Array operations only work if evaluation order is done from 
right to left.
- Contradictory to the rest of the language which promotes left 
to right evaluation.

5) CTFE'd Intrinsics
- First, there's a disparity between what is a compiler intrinsic 
and what is a ctfe intrinsic.  Eg: tan()
- Second, there is no use-case for being able to run at 
compile-time what is essentially a specialist x87 opcode.

6) Shared library support
- Still no documentation after 2 or more years of requesting it.

7) Interfacing with C++
- A new set of features that is danger of falling into the same 
"let's get it working" pit.  First warning sign was C++ template 
mangling, then DMD gave up on mangling D 'long' in any 
predictable way.  It's all been downhill from there.



More information about the Digitalmars-d mailing list