DIP 1040
Timon Gehr
timon.gehr at gmx.ch
Sun Jul 14 10:51:36 UTC 2024
On 7/14/24 12:39, Timon Gehr wrote:
> ...
>
> For the record: I am on board with DIP1040, except for the error-prone
> design of destructor elision in move constructors and move assignment
> operators. I think should be explicit.
>
Of course, even more can be done to make move semantics an even better
experience in D, but DIP1040 is a good basis. For example, I would want:
- an annotation that ensures a certain use of a variable is a move.
(This is important given that the analysis in DIP1040 will need to be
incomplete, so it is good to be able to confirm it works where it matters.)
- a parameter storage class that enforces the parameter was moved.
However, those can be pretty easily built on top of DIP1040. (And they
may even be the same feature.)
More information about the Digitalmars-d
mailing list