-preview=in might break code

kinke noone at nowhere.com
Sun Oct 4 22:53:49 UTC 2020


On Sunday, 4 October 2020 at 21:45:03 UTC, Walter Bright wrote:
> `in` is a nice, friendly looking construct. It looks like 
> pass-by-value

Only because it used to be by-value as you've pointed out. :) - 
 From a tabula rasa syntax standpoint, possibly-by-ref `in` IMO 
fits nicely as sort-of counterpart to by-ref `out`. Changing it 
to `in ref` would IMO be too verbose, still slightly confusing 
(not always a ref - but that'd be in line with `auto ref`... :]) 
and `in` alone (as `const scope`) wouldn't make much sense 
anymore, except for backwards-compatibility.


More information about the Digitalmars-d mailing list