Andrei Alexandrescu wrote:
Lars Kyllingstad wrote:
Andrei Alexandrescu wrote:
Hi everybody,


I just committed all of Phobos into svn on dsource.org. That is not an
official release and has known and unknown bugs, limitations, and
rhinodemons. I expect some ripples before we stabilize, but when we will
we'll stabilize at a higher potential.

Some corrections/suggestions to std.range, if you are ready for such yet:

I think isInfinite!() should be called isInfiniteRange!(). The current name is, in my opinion, too general.

I'm undecided about this (and similar cases). isInfinite sits inside std.range, so std.range.isInfinite is clear and std.range.isInfiniteRange feels redundant. On the other hand, I don't want to use too common symbols because then the user will be forced to prefix them whenever they clash.

I'm not too worried about name clashes, I just think it sounds wrong. If R is a range with infinitely many elements, I think it's more correct to say "R is an infinite range" than to say "R is infinite".

As an example of what I mean, let the range R be the sequence 1, 1/4, 1/9, ...:

  alias Sequence!("1/(n*n)", 1) R

Then, isInfiniteRange!(R) should obviously yield true. From a mathematical standpoint, I think the result of isInfinite!(R) is less obvious. Yes, the range has infinitely many elements, but none of them are infinite, nor is their sum infinite.

-Lars

Reply via email to