Feature request: lazy as a type constructor

BCS ao at pathlink.com
Tue Sep 25 16:11:57 PDT 2007


Reply to Christopher,

> Jarrett Billingsley wrote:
> 
>> "Janice Caron" <caron800 at googlemail.com> wrote in message
>> news:mailman.300.1190729504.16939.digitalmars-d at puremagic.com...
>> 
>>> Please may we have "lazy" as a type constructor (as well as a
>>> parameter storage class)? Currently I can declare a lazy array of
>>> ints, but not an array of lazy ints. That means we can't have
>>> variadic functions with lazy variadic parameters.
>>> 
>> vote += real.max;
>> 
>> While we're at it.. make ref a type constructor too.  REF RETURNS
>> WOOO can't wait for those.
>> 
> vote += real.nan;
> 
> I abstain, for myself and everyone else.
> 

qsort(taskBuffer.ptr, Task.sizeof, function int(void* a, void* b)
{
  return (cast(Task*)a).vote !< (cast(Task*)b).vote;
})
// now nan is at the head of the list :b





More information about the Digitalmars-d mailing list