First class lazy Interval

Michel Fortin michel.fortin at michelf.com
Fri Feb 27 19:44:05 PST 2009


On 2009-02-27 09:47:30 -0500, Daniel Keep <daniel.keep.lists at gmail.com> said:

>> assert(index in 0.._size);
> 
> I don't think this should be in the language... it just feels like there
> isn't enough use for it.  Especially not when you can implement it as a
> library.

Well, if a..b simply maps to an interval type in the standard library 
(as I think it should) then you can implement the "in" operator in the 
standard library, outside of the language, if you want.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list