DIP23 draft: Fixing properties redux

Steven Schveighoffer schveiguy at yahoo.com
Sun Feb 3 07:04:17 PST 2013


On Sun, 03 Feb 2013 08:04:10 -0500, Timon Gehr <timon.gehr at gmx.ch> wrote:

> T delegate() f = &a.prop -> auto f = ()=>a.prop;
> T delegate(T) f = &a.prop -> auto f = (T x)=>a.prop=x;

I don't like this solution.  You are creating a dummy delegate function,  
and moving the stack frame into the heap, just so you can get a delegate  
to an already existing function.

-Steve


More information about the Digitalmars-d mailing list