[swift-evolution] Replace named returns with `out` parameters?

Anton Zhilin antonyzhilin at gmail.com
Wed Dec 28 11:52:35 CST 2016


Ok, then –1 from me as well. I didn’t really want to push this feature.
At least now we have some evidence that people find labeled tuples more
convenient and would prefer them to in parameters.

2016-12-28 20:42 GMT+03:00 Andrew Arnopoulos <andrewarnopoulos at gmail.com>:

I'm not entirely sure I understand. Are you looking for a way to pass
> parameters by reference? Because there is a way to do that with the inout
> keyword. If not would you mind providing a different example to elaborate?
> Again, I think I may be missing your point.

The difference here would be declaration of the result variable right at
function call. It would be initialized inside the function.
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161228/1b5dcabb/attachment.html>


More information about the swift-evolution mailing list