The new, new phobos sneak preview
Michel Fortin
michel.fortin at michelf.com
Sun Apr 12 09:54:49 PDT 2009
On 2009-04-12 11:09:51 -0400, Lars Kyllingstad
<public at kyllingen.NOSPAMnet> said:
> Andrei Alexandrescu wrote:
>> Lars Kyllingstad wrote:
>>> 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.
Perhaps it should be renamed to isUnbounded then.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list