[swift-evolution] [Pitch] Support for pure functions. Part n + 1.
davesweeris at mac.com
Thu Feb 16 13:55:01 CST 2017
> On Feb 16, 2017, at 11:27 AM, Sean Heber via swift-evolution <swift-evolution at swift.org> wrote:
> Doesn’t this break down if you can pass a reference as a parameter to a pure function? If that’s not allowed, I guess I must have missed it. Also this seems to require the function has a return value. I suppose generally a pure function without a return value wouldn’t make much sense - unless you pass it a reference.
If it mutates whatever the input is referencing, it would have a side-effect which makes it "not pure" (for my understanding of what “pure” means).
- Dave Sweeris
More information about the swift-evolution