dsimcha wrote:
On the other hand, I do see a pattern here: Most of these features are things you only need to care about if you're writing near the tip of the pyramid, stuff like generic, reusable code. In fact, I've realized that my mindset when coding in D is completely different when working on something that aims to be extremely generic (like rangeextra or dstats, stuff I wouldn't even be able to do in any language besides D) vs. when working on day-to-day code that just has to solve one problem well. The latter is a lot easier, but also a lot less fun, from a programming perspective.
Andrei and I have talked about this a bit. He points out how Unix programming revolves around the notion of a file, and how the Unix utilities all plug into each other like building blocks to create powerful programs.
With D generic programming, the idea is to enable the creation of such snap-in components. Andrei has made a huge step forward with the range based library and the set of algorithms to go with them. Many of the seemingly arbitrary new language features of D2 are necessary to support this style of programming.
OOP and STL were also attempts at such snap-in component programming, and they both were modestly successful. We aim to take it considerably farther with ranges.
(One of the nice things about Phobos ranges is Andrei has taken a no-compromise approach with regard to performance. There's not going to be a tradeoff between power and performance, you'll get both.)
