+1. This has always tripped me up, I guess I felt there was a good reason for 
requiring you to add a `return`, but not sure what it would be.


> On 28 May 2016, at 3:57 AM, Adrian Zubarev via swift-evolution 
> <[email protected]> wrote:
> 
> The idea is simple:
> 
> Can we make return keyword optional in cases like this?
> Shouldn’t this behave like @autoclosure or @noescape?
> type A {
>     var characters: [Character] = …
>     var string: String { String(self.characters) }
>     var count: Int { 42 }
> }
> Is this worth a proposal or Swifty enough, what do you think?
> 
> Sure I could write return, but why do we allow this behavior for @noescape 
> functions like map!?
> 
> 
> 
> 
> -- 
> Adrian Zubarev
> Sent with Airmail
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution 
> <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