<html><head></head><body>I'll write a small proposal tomorrow for that behavior (not only for computed properties of course)! Today I'm too busy. <div><br></div><div>Thank you for your positive feedback.<br> <br><div class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <p class="gmail_quote" style="color:#000;">Am 28. Mai 2016 um 10:11:26, David Hart (<a href="mailto:david@hartbit.com">david@hartbit.com</a>) schrieb:</p> <blockquote type="cite" class="gmail_quote"><span><div><div></div><div>It isn’t a special case because all other single-statement closures in the language work that way. It’s actually inconsistent now.
<br>
<br><blockquote type="cite">On 28 May 2016, at 09:03, Brian Christensen via swift-evolution <swift-evolution@swift.org> wrote:
<br>
<br>On May 27, 2016, at 13:57, Adrian Zubarev via swift-evolution <swift-evolution@swift.org> wrote:
<br>
<br><blockquote type="cite">The idea is simple:
<br>
<br>        • Can we make return keyword optional in cases like this?
<br>        • Shouldn’t this behave like @autoclosure or @noescape?
<br>type A {
<br>var characters: [Character] = …
<br>var string: String { String(self.characters) }
<br>var count: Int { 42 }
<br>}
<br>
<br>Is this worth a proposal or Swifty enough, what do you think?
<br>
<br>Sure I could write return, but why do we allow this behavior for @noescape functions like map!?
<br></blockquote>
<br>While I am not necessarily against this idea, I do wonder if it’s worth making what’s going on here less obvious simply for the sake of being able to omit a six character keyword. As I understand it, one of the reasons ++/-- were removed was due to the increased "burden to learn Swift as a first programming language.” This is the sort of thing that becomes another one of those special cases that has to be explained to someone new to Swift.
<br>
<br>/brian
<br>
<br>_______________________________________________
<br>swift-evolution mailing list
<br>swift-evolution@swift.org
<br>https://lists.swift.org/mailman/listinfo/swift-evolution
<br></blockquote>
<br></div></div></span></blockquote>
</div></body></html>