Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Hooman Mehr via swift-evolution
Agreed. Actually, I was thinking about it while writing my response and wanted to go back and dig that thread to refresh my memory and bring it up. Thank you for taking care of that. > On May 25, 2017, at 7:33 PM, Charles Srstka wrote: > >> On May 25, 2017, at

Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Charles Srstka via swift-evolution
> On May 25, 2017, at 9:26 PM, Hooman Mehr via swift-evolution > wrote: > > This is common when you are using façade design pattern. You use a façade to > flatten and hide the internal composition of a composite object and present > it as a single flat object. In

Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Hooman Mehr via swift-evolution
This is common when you are using façade design pattern. You use a façade to flatten and hide the internal composition of a composite object and present it as a single flat object. In some types of projects this comes up rather frequently. Both in client / UI programming and server side /

Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Harshil Shah via swift-evolution
Personally I write a lot of UI code, and so the pattern is used quite a lot to expose certain properties, for example a button's `title` and `textColor`. Oftentimes, the view hierarchy itself is complicated enough that exposing views directly is not feasible, so a host of such aliases are

Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Charles Srstka via swift-evolution
> On May 25, 2017, at 1:34 PM, Xiaodi Wu via swift-evolution > wrote: > > On Thu, May 25, 2017 at 10:08 AM, Harshil Shah via swift-evolution > > wrote: > Hi all, > > The idea behind this is to add a

Re: [swift-evolution] [Pitch] Computed properties as aliases

2017-05-25 Thread Xiaodi Wu via swift-evolution
On Thu, May 25, 2017 at 10:08 AM, Harshil Shah via swift-evolution < swift-evolution@swift.org> wrote: > Hi all, > > The idea behind this is to add a shorter, cleaner syntax for the common > pattern of using computed properties to provide public API for properties > of private variables. > > For