Re: [swift-evolution] Propagating Optionals

2016-10-07 Thread T.J. Usiyan via swift-evolution
On Sun, Sep 25, 2016 at 4:19 PM, Trans via swift-evolution < swift-evolution@swift.org> wrote: > As I've been learning Swift recently, one aspect of the language > jumped out at me with a "code smell". Namely, the way Optionals are > handled. For starters, just consider how long this chapter is:

Re: [swift-evolution] Propagating Optionals

2016-09-26 Thread Jeremy Pereira via swift-evolution
> On 26 Sep 2016, at 00:26, William Sumner via swift-evolution > wrote: > >> >> let roomCount = john.residence.numberOfRooms >> >> // error: value of optional type 'Residence?' not unwrapped; did >> you mean to use '!' or '?'? >> >> As general rule of thumb,

Re: [swift-evolution] Propagating Optionals

2016-09-26 Thread Haravikk via swift-evolution
> On 25 Sep 2016, at 21:19, Trans via swift-evolution > wrote: > > "john.residence.numberOfRooms" could just behave one way or the other While I understand where you're coming from, I think the problem is that whichever version we specified as a guess would be

Re: [swift-evolution] Propagating Optionals

2016-09-25 Thread Brent Royal-Gordon via swift-evolution
On Sep 25, 2016, at 4:19 PM, Trans via swift-evolution wrote:Basically "john.residence.numberOfRooms" is a completely wasted_expression_ -- it's meaningless.Not true; it's an attempt to access the `numberOfRooms` property on `Optional`. That property doesn't exist, but

Re: [swift-evolution] Propagating Optionals

2016-09-25 Thread William Sumner via swift-evolution
> On Sep 25, 2016, at 2:19 PM, Trans via swift-evolution > wrote: > > As I've been learning Swift recently, one aspect of the language > jumped out at me with a "code smell". Namely, the way Optionals are > handled. For starters, just consider how long this chapter

[swift-evolution] Propagating Optionals

2016-09-25 Thread Trans via swift-evolution
As I've been learning Swift recently, one aspect of the language jumped out at me with a "code smell". Namely, the way Optionals are handled. For starters, just consider how long this chapter is: