Re: in vs inout

2020-04-30 Thread Steven Schveighoffer via Digitalmars-d-learn
e array without editing any of the values pointed at. But in terms of 'in' vs. 'inout', I'd say 'in' unless you have a specific reason to use inout (the above included). -Steve

Re: in vs inout

2020-04-30 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 30 April 2020 at 14:00:40 UTC, Arredondo wrote: I had been using inout for some time now for "purely input function parameters". `inout` is more specifically for things you take in, look at, then pass back out. So it forms part of your return value. `const` is for when you are j

in vs inout

2020-04-30 Thread Arredondo via Digitalmars-d-learn
The recent change log for v2.092.0 Beta says that with the new implementation for the `in` storage class: `in` should be the storage class of choice for purely input function parameters. I had been using inout for some time now for "purely input function parameters". Is there a case to be ma