observation: D getting a bit complex

Spacen Jasset via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 29 19:42:26 PDT 2015


The following reminds me of the good old C++ template errors the 
C++ compiler spits out.

Whilst D has fixed that problem, some things have gotten more 
complex. I just wanted to find a replacement for D1 path join, 
and found this, but it doesn't seem very easy to wade though this 
stuff.


immutable(ElementEncodingType!(ElementType!Range))[] 
buildPath(Range)(Range segments) if (isInputRange!Range && 
isSomeString!(ElementType!Range));
pure nothrow @safe immutable(C)[] buildPath(C)(const(C)[][] 
paths...) if (isSomeChar!C);

http://dlang.org/phobos/std_path.html

It would take me a lot of time to appeciate what that all means, 
although I can imagine what it is for.

...just and observation. The complexity is building.


More information about the Digitalmars-d-learn mailing list