On Feb 16, 2017, at 1:27 PM, Sean Heber via swift-evolution <swift-evolution@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.
Not only that, but even if you pass a value type as a parameter, that value type might have reference types as ivars. So since any call to any reference type can potentially mutate it, and any call to any value type could call through to a reference type which might then be mutated, it does seem that purity is quite difficult to guarantee. Charles _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution