<div dir="ltr">+1<div><br></div><div>We don’t need “return” in single-line closures where the type is known, and I don’t see why it is required in single-line getters.</div><div><br></div><div>Nevin</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 7, 2017 at 10:07 AM, James Valaitis via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is it widely agreed that it is necessary to require a return statement on a one line property getter?<br>
<br>
var session: AVCaptureSession { get { return layer.session } }<br>
<br>
Or could we follow the convention for any other close and get rid of it? For me it seems redundant; the word `get` literally precedes the closure.<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</blockquote></div><br></div>