This is very nice for writing lazy var definitions and single-line computed
properties as well. +1 from me.

On Sat, Dec 19, 2015, 8:30 AM Craig Cruden via swift-evolution <
[email protected]> wrote:

>
> When writing short functional code in a function it would be nice if the
> return keyword were an optional keyword.
>
> Just return the last evaluated expression.
>
>
> i.e.
>
>     func flipFunc<T, U>(arg1: T, arg2: U) -> (U, T) {
>         (arg2, arg1)
>     }
>
>
> The keyword return would still be there for breaking out of a function.
> _______________________________________________
> 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