Binding rvalues to ref parameters

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Mar 24 12:51:07 UTC 2018


Hi Manu and everyone else:


I'm publicly distributing what started as a private email to Manu - I'm 
trying to get a point across that is important and of general interest.

I've seen in a recent thread (titled "rvalues -> ref (yup... again!)") 
that Manu brought up the implicit conversion of rvalues to ref 
parameters. Sadly I don't have the bandwidth to follow that thread, let 
alone posting in it. However, I do have great news.

Manu has asked for this feature literally for years. He has presented 
good motivating examples and made reasonable arguments. Sadly, none of 
his forum discussions or in-person discussions during DConf made an 
impact - frustratingly, there was no change in the language.

It is likely this forum thread will also end the same. The good news is 
there is a way to ensure your proposal gets a fair shake of the stick: 
write a DIP.

Filing a DIP is like filing a police report: once it's in the system, 
we're obligated to work on it. There's a guarantee of a response. In the 
case of acceptance, we commit to implementing the proposal. In the case 
of rejection, we give a clear motivation of the reasons we had. In the 
case we ask for further review, we provide clear feedback of what would 
take the DIP through another iteration.

Forum discussions are the equivalent of complaining loudly in a bar to 
people you know and also to strangers within earshot that your house was 
broken into. Until you file a report, the police will not look into it.

I repeat: there is a GUARANTEED mechanism to get us to work on binding 
rvalues to ref parameters. GUARANTEED. This is so powerful, it's 
disconcerting. You need to get a DIP written in all detail, get it 
through community review, and then we have no choice but to look into it.


Thanks,

Andrei


More information about the Digitalmars-d mailing list