Is it possible to handle 'magic' property assignments a'la PHP?

Philippe Sigaud philippe.sigaud at gmail.com
Tue Jan 7 04:22:46 PST 2014


On Tue, Jan 7, 2014 at 8:50 AM, Jacob Carlborg <doob at me.com> wrote:
> I would like to have that in D as well, but with braces instead:
>
> void loop (void delegate () dg);
>
> loop {
>     // endless loop
> }

What about:

void loop(void delegate() dg);

loop({
...

});

Since any block is a void delegate().


More information about the Digitalmars-d-learn mailing list