`in` parameters made useful

Atila Neves atila.neves at gmail.com
Wed Aug 26 08:31:19 UTC 2020


On Wednesday, 26 August 2020 at 04:15:21 UTC, Mathias LANG wrote:
> On Tuesday, 25 August 2020 at 14:43:45 UTC, Atila Neves wrote:
>> On Friday, 31 July 2020 at 21:49:25 UTC, Mathias LANG wrote:
>>> Hi everyone,
>>> For a long time I've been pretty annoyed by the state of `in` 
>>> parameters.
>>> In case it needs any clarification, I'm talking at what's 
>>> between the asterisks (*) here: `void foo (*in* char[] arg)`).
>>>
>>> [...]
>>
>> I think that having `in ref` is preferable than introducing 
>> new rules. Everything else makes sense to me, but it's 
>> possible I'm missing something.
>
> Why is it preferable ? Genuine question here.
> I originally had in mind to support `in ref` as being the user 
> forcing `ref` on the param. It just seemed *obvious*. However, 
> after a lot of playing around with it, it wasn't that obvious 
> anymore.

For me, more programmer choice and less magic.


More information about the Digitalmars-d mailing list