So what does (inout int = 0) do?
jmh530 via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 15 11:24:28 PDT 2016
On Friday, 15 April 2016 at 17:11:39 UTC, Andrei Alexandrescu
wrote:
>
> 3. For all problems that inout is purported to solve, I know of
> idioms that are definitely simpler and overall almost as good
> if not better. So a hard question is whether the existence is
> justified.
If it's something to be avoided except in particular cases, then
I suggest that is made clear in the documentation. I had not
realized that the main reason that inout was added was because of
not being able to use templates as virtual functions in classes.
More information about the Digitalmars-d
mailing list