Re: [swift-evolution] [idea] errors in properties

2017-07-26 Thread Gor Gyolchanyan via swift-evolution
> On Jul 26, 2017, at 8:21 AM, Ben Rimmington wrote: > > Brent Royal-Gordon has written a draft proposal: > > > I totally love it! I’m even OK with wrapping stored

Re: [swift-evolution] [idea] errors in properties

2017-07-25 Thread Ben Rimmington via swift-evolution
Brent Royal-Gordon has written a draft proposal: > On 25 Jul 2017, at 21:58, Gor Gyolchanyan via swift-evolution > wrote: > > This sounds like a challenge  > But seriously, seems like straight-up implementing the

Re: [swift-evolution] [idea] errors in properties

2017-07-25 Thread Gor Gyolchanyan via swift-evolution
This sounds like a challenge  But seriously, seems like straight-up implementing the feature and then wondering whether or not the pull request will be merged in or rejected is an unnecessary gamble, which is why swift-evolution exists. Haven’t anyone tried to make a proposal for this? I’d

Re: [swift-evolution] [idea] errors in properties

2017-07-25 Thread Jacob Williams via swift-evolution
I’d give my +1 to support this as I’ve wished at one time or another that I could throw in the get, set, willSet, or didSet. Would this be something a proposal should be written up for when the Swift 5 reviews begin? > On Jul 25, 2017, at 2:55 PM, Xiaodi Wu via swift-evolution >

Re: [swift-evolution] [idea] errors in properties

2017-07-25 Thread Xiaodi Wu via swift-evolution
There have been a number of discussions on the list in this—Google finds a number of these with a search “swift throwing properties site: lists.swift.org”. The “tldr” seems to be that it’s not supported because no one has written code to support it yet. On Tue, Jul 25, 2017 at 15:29 Gor

[swift-evolution] [idea] errors in properties

2017-07-25 Thread Gor Gyolchanyan via swift-evolution
I’ll just cut to the chase: Why is throwing from get, set, willSet and didSet disallowed? var login: String { willSet throws { guard newValue.count > 5 else { throw LoginError.loginTooSmall } } } try login = “JebediahKerman”