RValue DIP Draft.

Elronnd elronnd at elronnd.net
Tue Oct 19 03:53:45 UTC 2021

I support this DIP.  However:

> For objects larger than 1-2 registers in size, passing by 
> pointer may be more efficent than passing by value

I don't buy this

Really, there are two issues being brought up:

1. Copying large objects is slow

2. Copy constructors may be slow

1 is exclusively an ABI issue, and should be solved at the ABI 
level (cf 

Regarding 2, consider that this DIP applies to rvalues.  That is, 
it applies to expressions like:


The proper fix for this is to turn the last use of a struct into 
a move instead of a copy.  (I believe there was a DIP proposing 

More information about the Digitalmars-d mailing list