[swift-evolution] ternary operator ?: suggestion
al_skipp at fastmail.fm
Fri Dec 11 19:31:49 CST 2015
let v = if condition then “A" else “B"
No mysterious symbols or braces, or multiline monstrosity.
> On 12 Dec 2015, at 01:18, Andrey Tarantsov via swift-evolution <swift-evolution at swift.org> wrote:
> Strong -1; this turns a quick one-liner into a multiline monstrosity. When massaging coordinates and layouts in iOS apps, ?: is often helpful to handle corner cases inline.
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution