We need better documentation for functions with ranges and templates

dnewbie via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 14 11:56:29 PST 2015


On Monday, 14 December 2015 at 19:04:46 UTC, bachmeier wrote:
> It's unanimous, at least among the three of us posting in this 
> Reddit thread:
> ...

Take for example C# Docs: 
https://msdn.microsoft.com/en-us/library/system.collections.arraylist.addrange.aspx

Syntax C#:

public virtual void AddRange(
	ICollection c
)

Parameters:
     c
     Type: System.Collections.ICollection
     The ICollection whose elements should be added to the end of 
the ArrayList. The collection itself cannot be null, but it can 
contain elements that are null.

Clean, simple and instructive!

On the otherhand, imagine a newbie looking:

bool isSameLength(Range1, Range2)(Range1 r1, Range2 r2) if 
(isInputRange!Range1 && isInputRange!Range2 && !isInfinite!Range1 
&& !isInfinite!Range2);


Well, most of my friends of college that I indicated D language 
thinks the D docs is confusing.

Ron.


More information about the Digitalmars-d mailing list