What's happening with the `in` storage class
SonicFreak94
sonicfreak94 at hotmail.com
Sat Jun 9 02:38:14 UTC 2018
On Saturday, 9 June 2018 at 02:17:18 UTC, Adam D. Ruppe wrote:
> On Saturday, 9 June 2018 at 02:13:00 UTC, Walter Bright wrote:
>> But it was never enforced, meaning that suddenly enforcing it
>> is just going to break code left and right.
>
>
> It isn't going to break anything. It is going to *correctly
> diagnose already broken code*.
>
> That's a significant difference. Real world D users don't like
> broken code, but they DO like the compiler catching new bugs
> that slipped by before.
I agree. I would rather my potentially broken code be pointed out
to me rather than removing the much more concise `in` from my
code. In any case, I feel as though the concept of both `in` and
`out` should be fairly intuitive. `in` would be a read-only
reference (C# has received this recently), and `out` is a
reference with the intention to write.
More information about the Digitalmars-d
mailing list