relax inout rules?

kenji hara k.hara.pg at gmail.com
Tue Dec 13 03:07:49 PST 2011


2011/12/13 Timon Gehr <timon.gehr at gmx.ch>:
> On 12/13/2011 09:41 AM, kenji hara wrote:
[snip]
>>
>> Against an inout function that does not return inout type:
>> - the number of inout parameters should be 2 more?
>
> If we required that, then IFTI would also have to replace inout with const
> in case there is only one of them. That potentially introduces
> counter-intuitive behaviour.

Maybe it is an enhancement filed as 6809.

>> - at least one parameter should have 'out' or 'ref' storage class as a
>> *return parameter*?
>
> Not necessarily.
>
>> But I'm not sure these restrictions are necessarily required.
>
> I think we should indeed drop the restrictions, because they complicate the
> language for little gain.

Indeed.

Kenji Hara


More information about the Digitalmars-d mailing list