On Wednesday, 20 November 2019 at 16:29:20 UTC, Rumbu wrote:

When a function signature looks like this

ElementEncodingType!(ElementType!RoR)[] join(RoR, R)(RoR ror, scope R sep) if (isInputRange!RoR && isInputRange!(Unqual!(ElementType!RoR)) && isInputRange!R && is(Unqual!(ElementType!(ElementType!RoR)) == Unqual!(ElementType!R)))

or like this:

E[] replaceFirst(E, R1, R2)(E[] subject, R1 from, R2 to)
if (isDynamicArray!(E[]) && isForwardRange!R1 && is(typeof(appender!(E[])().put(from[0..1]))) && isForwardRange!R2 && is(typeof(appender!(E[])().put(to[0..1]))));

it's understandable why documentation is mandatory.

That's true, Rumbu!

And despite that, it's always marvel me the fact that I can simply read the above and actually "understand it"!

It's some kind of magic, but maybe it's simply why I'm forced to read too much C++ recently... :-P

PS ... the most difficult part for a beginner maybe is the historical "is(typeof( ... bla bla ...)"

Reply via email to