I looked at the discussion and it looked like they were discussion two things 
combined.
   - inferred return type (on function signature) 
   - and omitting return on the return.

I agree with Chris on the fact that the function should have the type of return 
specified on the signature and not inferred since it is useful for API 
documentation to know that ahead of time on a strongly typed language.

What is not necessary is actually forcing people to type return “x” on the last 
line - since “return” is rather redundant and clutter for those people of a 
functional programming paradigm point of view.


> On 2015-12-20, at 4:15:15, Stephen Christopher via swift-evolution 
> <[email protected]> wrote:
> 
> The discussion I was remembering, comment courtesy of Chris: 
> https://devforums.apple.com/message/1014317#1014317 
> <https://devforums.apple.com/message/1014317#1014317>
> 
> (linked from https://devforums.apple.com/thread/255242 
> <https://devforums.apple.com/thread/255242>)
> 
>  _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

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

Reply via email to