Feature request: lazy as a type constructor

Stewart Gordon smjg_1998 at yahoo.com
Wed Sep 26 18:29:28 PDT 2007


"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)?

I'm not sure how the implementation of this would work in general.

> 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.
<snip>

Actually you can:

http://www.digitalmars.com/d/function.html
"Lazy Variadic Functions

If the variadic parameter is an array of delegates with no parameters:

void foo(int delegate()[] dgs ...);

Then each of the arguments whose type does not match that of the delegate is 
converted to a delegate."

Stewart.

-- 
My e-mail address is valid but not my primary mailbox.  Please keep replies 
on the 'group where everybody may benefit. 




More information about the Digitalmars-d mailing list