On 9/13/16 5:01 PM, Yuxuan Shui wrote:

For example, a common use case might be I want to capture everything by
value. In stead of adding all the fields by hand and passing them to the
constructor, I want the compiler to do it for me.

i.e. I wish I could (borrowing C++ syntax):

struct A[=] {
   ...
}

Then the context will be captured by value instead of reference.

This is a valid enhancement. Why not try and ask for it?

I don't know if the specific syntax would work for D, but the feature seems useful in some respects.

-Steve

Reply via email to