UFCS for struct opCall?

deadalnix deadalnix at gmail.com
Tue Apr 9 09:27:37 PDT 2013


On Tuesday, 9 April 2013 at 16:22:08 UTC, Andrei Alexandrescu 
wrote:
> How do you address construction of immutable objects?
>

In general, the first assignement of a field in a constructor 
must be handled as a declaration, not as an assignement. It solve 
const/immutable construction issues as well as avoiding 
unecessary copy/destruction as Ali pointed in a recent post.

The magic only happens in the constructor, so it can still be 
considered as a regular function seen from the outside.


More information about the Digitalmars-d mailing list