On Friday, March 29, 2013 04:01:40 Vidar Wahlberg wrote: > Or is it > unthinkable that I mistook arrays and Ranges for being > interchangeable when the examples pass an array to a function > that takes a Range?
I don't think that it's unthinkable at all (and arrays _are_ ranges; it's just that in the case of output ranges, arrays act a bit oddly). The documentation should probably be improved to make such a mistake less likely. > Ranges is something that's going to be new for a lot of people > entering this language. When you know how arrays and ranges works > in D I'm sure this makes perfect sense, but until you learn that, > this is something that likely will confuse many people. > > Hopefully the article about ranges will clear things up for me. Yes. Ranges are incredibly powerful, but while the concept doesn't originate with D, AFAIK, actually using them in a serious API (particularly in a standard library) is unique to D. And our lack of good tutorials on them is probably our biggest documentation problem. It definitely needs to be fixed. - Jonathan M Davis
