Pure Factory Functions 💔 `inout`
ag0aep6g
anonymous at example.com
Fri Feb 10 20:02:49 UTC 2023
On Friday, 10 February 2023 at 19:33:26 UTC, ag0aep6g wrote:
> David also describes "pure factory functions" (without calling
> them that) as "not [taking] any arguments with mutable
> indirections".
Though I just realized that that can be interpreted two ways:
1. The function does not have any *parameters* with mutable
indirections. I.e., `const` is ok. This is what DMD does.
2. The function cannot be called with mutable indirections. I.e.,
`const` is not ok.
I think the first interpretation is the intended one, but I can't
say I'm sure.
More information about the Digitalmars-d
mailing list