why are Assign Expressions r-values?

Derek Parnell derek at nomail.afraid.org
Sun Apr 29 17:55:50 PDT 2007


On Mon, 30 Apr 2007 09:42:32 +0900, Bill Baxter wrote:
> I was thinking vaguely the other day that it might be nice if you could 
> 'return void;'  as a synonym for just plain 'return;'.

This has been suggested before, but I guess Walter hasn't placed in his
TODO list (yet?). 

I believe another use of this syntax is in generic code (templates) ...


 template Foo(T)
 {
     T Foo(T[] data) { T elem; ... return T; }
 }

 void[] Bar;
 . . .
 Foo(Bar);


-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
30/04/2007 10:52:16 AM



More information about the Digitalmars-d mailing list