>> I also don't like that this proposal doesn't include an "Impact on existing 
>> code" section. We ought to decide whether the migrator will add 
>> `@discardableResult` to existing symbols or not.
> 
> I totally agree with Erica – the migrator should only remove existing 
> @warn_unused_result attributes. @discardableResult should be added manually 
> and deliberately to functions in stdlib and your own code. We'll be happy to 
> clarify this behavior under "Impact on existing code" section.

I agree in general, but I'm sure there are at least one or two codebases out 
there which really *have* been thoroughly audited and their authors will be 
highly displeased to have to update them manually. We might want to provide an 
option to invert the existing annotations, or to invert things automatically if 
the code meets some heuristic, like having more than half of the functions in a 
given file marked with `@warn_unused_result`.

-- 
Brent Royal-Gordon
Architechies

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

Reply via email to