[swift-evolution] Customized Inline Init Closure

2016-08-30 Thread Weston Catron via swift-evolution
Jo- Sorry for such a delayed response. $0 is interesting, is this a common language concept elsewhere? I would still push for using the variable name or possibly a new keyword (this, self2, it), which is really just a more expressive $0. Or don’t keep self and just stick with the limitation of

Re: [swift-evolution] Customized Inline Init Closure

2016-01-05 Thread Thorsten Seitz via swift-evolution
Very nice! I also think that using $0 is fine as it avoids all the problems with shadowing the outer self and thereby avoids erros and increases readability. -Thorsten > Am 04.01.2016 um 18:51 schrieb Jo Albright via swift-evolution > : > > Here is another option. Attached is a playground I

Re: [swift-evolution] Customized Inline Init Closure

2016-01-03 Thread Weston Catron via swift-evolution
Thanks! Then looks very interesting and I’ll reach out to the lead there and see if they’re interested in working together. It definitely highlights similar readability issues I had outlined. I’m curious if there are compiler or other advantages to initializing more properties before continuing

Re: [swift-evolution] Customized Inline Init Closure

2016-01-03 Thread Weston Catron via swift-evolution
I believe you’re referring to this https://gist.github.com/erica/eb32feb22ba99629285a currently being developed. I was initially limiting this proposal to initializers, specifically overriding them verses immediately following them. This is a

Re: [swift-evolution] Customized Inline Init Closure

2016-01-03 Thread Adriano Ferreira via swift-evolution
Hey there! As a suggestion, check out this simple yet very interesting project called Then by @devxoul. Best, — A > On Jan 3, 2016, at 1:37 AM, Weston Catron via swift-evolution > wrote: > > Ability to write an initializer while initializing an object. > >

Re: [swift-evolution] Customized Inline Init Closure

2016-01-03 Thread Tino Heth via swift-evolution
Something similar has been discussed ("method cascading"), and I hope the feature will be considered for Swift 4(?). It is a little bit different, though: "self" would not change its meaning (which imho is a plus), and the syntax is different. Tino ___

[swift-evolution] Customized Inline Init Closure

2016-01-02 Thread Weston Catron via swift-evolution
Ability to write an initializer while initializing an object. Example let name = “John Apple”; let person = Person { self.name = nameInput.first() + " " + nameInput.last() self.dob = dateInput.datetime() If (self.age() > 18) { self.taxableStatus = INDEPENDANT } else {