dsimcha wrote:
I suspect that your lack of understanding of ranges stems from lack of
understanding of templates, since you mention that "noone understands templates"
and once you get templates, ranges are ridiculously simple. If that's the case,
then your best bet is probably to learn a little more about templates (which are
so fundamental to what makes D special IMHO that I would say that, for all
practical purposes, if you don't understand templates you don't understand D)
and
then try to understand ranges again.
I think steve understands templates and he was actually re-quoting the
quotes from the digitalmars d docs:
http://digitalmars.com/d/2.0/template.html
I think that I can safely say that nobody understands template
mechanics. -- Richard Deyman
http://digitalmars.com/d/2.0/templates-revisited.html
"What I am going to tell you about is what we teach our programming
students in the third or fourth year of graduate school... It is my task
to convince you not to turn away because you don't understand it. You
see my programming students don't understand it... That is because I
don't understand it. Nobody does."
-- Richard Deeman
Also I hope this quote summarizes some of the viewpoints of ranges
implemented through templates:
"If a nuke had a single big red button as a detonator, then you have a
lot of power and that is very easy to use. Doesn't necessarily make it
the right weapon for the job though."