[swift-evolution] Proposal: "out" variables

Stephen Celis stephen.celis at gmail.com
Sun Feb 28 12:40:10 CST 2016

> On Feb 28, 2016, at 1:20 PM, Amir Michail via swift-evolution <swift-evolution at swift.org> wrote:
> Although you could use a tuple of return values to pass data back from a function, doing so when you have many things to pass back is less than ideal.

Why? Please provide an example of where this is "less than ideal" and how your solution would be more ideal.

In general:

- Non-toy example?
- Why is this better than using a tuple? Please justify with your example.
- Why is a new language feature, `out`, better than an `inout` function that runs an assertion for you?
- Why does this belong in the standard library and why can't you define it yourself?


More information about the swift-evolution mailing list