Re: [swift-evolution] Optional Argument Chaining

2017-12-12 Thread Jared Khan via swift-evolution
wn) { > // use contents here > } > > That doesn't work when you need multiple optional parameters. In my own > experience, that hasn't been a huge problem, though. > > Félix > >> Le 11 déc. 2017 à 08:30, Jared Khan via swift-evolution >> <swift-evolution@swift.org <

Re: [swift-evolution] Optional Argument Chaining

2017-12-12 Thread Jared Khan via swift-evolution
gt; f(g()?, h()?, i(), j()?)? > // like > try f(try g(), try h(), i(), try j()) > ``` > > ``` > foo(bar(x()?)) + y()? > // like > foo(bar(try x())) + (try y()) > ``` > > -- > Yuta > > > 2017-12-12 7:42 GMT+09:00 Slava Pestov via swift-evolution > <swift-e

Re: [swift-evolution] Optional Argument Chaining

2017-12-11 Thread Jared Khan via swift-evolution
I missed the previous threads! I’ve found one of the relevant threads here: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160711/024201.html Thanks for this important point. If you were to

Re: [swift-evolution] Optional Argument Chaining

2017-12-11 Thread Jared Khan via swift-evolution
I missed the previous threads! I’ve found one of the relevant threads here: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160711/024201.html Thanks for this important point. If you were to

Re: [swift-evolution] Optional Argument Chaining

2017-12-11 Thread Jared Khan via swift-evolution
situation is yet but afaik ‘?’ has never been available as a postfix operator. Perhaps I’m missing your point, could you demonstrate where it is allowed? Best, Jared > On 11 Dec 2017, at 17:07, Magnus Ahltorp <m...@kth.se> wrote: > > >> 12 Dec. 2017 01:30 Jared Kha

[swift-evolution] Optional Argument Chaining

2017-12-11 Thread Jared Khan via swift-evolution
Hi all, I'd like to propose a syntax addition that acts to ease some things that I believe should fall under the umbrella of 'optional chaining'. Optional chaining allows us to access the properties of an optional value and return nil if any link in that chain breaks. I propose we introduce