Distributor's whishlist and questions for D

Matthias Klumpp via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 21 08:41:17 PDT 2016


On Thursday, 21 April 2016 at 11:58:23 UTC, Kagamin wrote:
> On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp 
> wrote:
>> [...]
>
> Many D users are enthusiasts and push the compiler to its 
> limits, they are usually stuck with DMD (even DMD HEAD 
> sometimes) as it provides the latest fixes. It depends on the 
> coding style, AppStream generator is an example of old good 
> plain business logic one is unlikely to need recent frontend 
> for, but for people writing black magic code a couple of 
> versions lag of free compilers behind DMD is usually a blocker, 
> but whoever uses the free compilers already considers them 
> complete enough for their tasks. Currently LDC looks like the 
> most actively maintained one.

Asgen is super-boring code ;-) Mainly because the task it 
performs can be represented without using much black magic. But 
still, in order to make it work, I needed to embed a copy of 
std.concurrency.Generator in my code, because GDCs Phobos didn't 
contain that thing yet (and it's *so* useful!). Basically, the 
huge differences in the standard versions is what annoyed me the 
most in D, since it also means you can't trust the documentation 
much, depending on the compiler you use. For someone new to D, 
this is annoying.

LDC also fails to compile asgen:
```
/usr/include/d/std/parallelism.d-mixin-3811(3837): Error: 
template core.atomic.atomicOp cannot deduce function from 
argument types !("+=")(shared(ulong), int), candidates are:
/usr/include/d/core/atomic.d(178):        
core.atomic.atomicOp(string op, T, V1)(ref shared T val, V1 mod) 
if (__traits(compiles, mixin("val" ~ op ~ "mod")))
/usr/include/d/std/parallelism.d-mixin-3811(3837): Error: 
template core.atomic.atomicOp cannot deduce function from 
argument types !("+=")(shared(ulong), int), candidates are:
/usr/include/d/core/atomic.d(178):        
core.atomic.atomicOp(string op, T, V1)(ref shared T val, V1 mod) 
if (__traits(compiles, mixin("val" ~ op ~ "mod")))
/usr/include/d/std/parallelism.d-mixin-3823(3849): Error: 
template core.atomic.atomicOp cannot deduce function from 
argument types !("+=")(shared(ulong), int), candidates are:
/usr/include/d/core/atomic.d(178):        
core.atomic.atomicOp(string op, T, V1)(ref shared T val, V1 mod) 
if (__traits(compiles, mixin("val" ~ op ~ "mod")))
/usr/include/d/std/parallelism.d(3344): Error: template instance 
std.parallelism.ParallelForeach!(Package[]) error instantiating
source/engine.d(90):        instantiated from here: 
parallel!(Package[])
```
while GDC compiles the code flawlessly (LDC previously even 
crashed, but that was with the beta version). I will investigate 
why this happens now, but it's basically these small things which 
make working with D less fun, at least when you want to use a 
system without proprietary components.


More information about the Digitalmars-d mailing list