The new, new phobos sneak preview

Leandro Lucarella llucax at gmail.com
Sun Apr 12 11:24:07 PDT 2009


Leandro Lucarella, el 12 de abril a las 15:19 me escribiste:
> Michel Fortin, el 12 de abril a las 12:54 me escribiste:
> > 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.
> 
> I was about to write exaclty the same suggestion. I'm glad I read the
> responses before posting =)

Maybe isBounded, to avoid the double negation when checking for
!isUnbounded...

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
PITUFO ENRIQUE ATEMORIZA CATAMARCA, AMPLIAREMOS
	-- Crónica TV



More information about the Digitalmars-d mailing list