Re: [swift-evolution] Property Getter Return Statement

2017-10-18 Thread James Valaitis via swift-evolution
I am going to try to learn how to implement this and submit a proper proposal. > On 7 Oct 2017, at 15:07, James Valaitis wrote: > > Is it widely agreed that it is necessary to require a return statement on a > one line property getter? > > var session: AVCaptureSession { get { return layer.se

[swift-evolution] Property Getter Return Statement

2017-10-07 Thread James Valaitis via swift-evolution
Is it widely agreed that it is necessary to require a return statement on a one line property getter? var session: AVCaptureSession { get { return layer.session } } Or could we follow the convention for any other close and get rid of it? For me it seems redundant; the word `get` literally prece

[swift-evolution] Idea: Public Access Modifier Respected in Type Definition

2017-09-28 Thread James Valaitis via swift-evolution
When declaring a public class or struct the properties still default to internal. ``` public final class NewType { /// This property defaults to internal. var property: Any? } ``` This is not the same for a public extension on the type, where then the access modifier is respected