On Tuesday, October 25, 2011 16:16 Brad Anderson wrote: > On Tue, Oct 25, 2011 at 5:12 PM, Jonathan M Davis <[email protected]>wrote: > > On Tuesday, October 25, 2011 15:55 Walter Bright wrote: > > > On 10/25/2011 3:40 PM, Piotr Szturmaj wrote: > > > > I share your opinion. I was thinking about such filter concept for > > > > std.crypto.cipher (TBD), but I will also try to convert current hash > > > > function code to ranges. > > > > > > > > Thanks for pointing that out. > > > > > > Andrei and I have pretty much failed at articulating this vision for > > > Phobos. We need to get our act together. > > > > Ranges in general are not something that is comunicated very well. > > They're not > > in TDPL, and none of the online documentation discusses them in detail. > > You pretty much only learn them from reading Phobos' documentation and > > using Phobos or from discussing it with people who know about them > > already. And there's no overall plan or design for Phobos articulated > > _anywhere_ that I'm > > aware of, so between those two facts, there's really nothing to get such > > a vision across to anyone other than word of mouth (though I suppose > > that it's > > more "word of keyboard" in many cases). > > > > - Jonathan M Davis > > I learned about them from Andrei's boostcon talk. Not exactly the first > place you'd look for information about D but the talk was very informative.
That and an article that Andrei wrote on ranges a while back which was not D- specific are the only online sources on ranges that I'm aware of, and to my knowledge, neither of them are referenced on D's site. Ranges are a powerful concept, but they're not well known, in part because they're relatively new - particularly when it comes to being used in a major library, let alone the standard library for a language. So, they definitely need some explaining. I was working on article on ranges a while back, but tabled it due to bugs related to std.container.Array rendering my examples unworkable. I should probably get back to working on that and see if those issues still exist or whether I can better work around them in the article. But the fact that dynamic arrays are actually a very poor example of ranges in some regards (given the fact that people tend to think of them as containers even though they really aren't in D) complicates things in a way that I'd really like to be able to explain some of the concepts using a real container rather than arrays. - Jonathan M Davis
