On 13.04.2016 19:48, Erica Sadun wrote:
> My version of `with` doesn't have this issue. However, it's a clear logical error on the programmer's part when you treat a value type as a reference type.

Could you provide your 'with' function please?(checked last emails - can't find) Right now it is not clear for me how this problem could be resolved.

As for your notes about "value/reference".. Could you describe with more details? In my example, I want to show that with this 'with' function you can compile code that tries to change constant of value(struct) type. Let say just by mistake, i.e. initially you wanted to just get values of this struct constant. So this 'with' function should be treated as hack, not as a good solution for 'with' feature. (yes, for reference type it should work OK)

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to