> On Oct 7, 2016, at 2:56 PM, Trans via swift-evolution 
> <[email protected]> wrote:
> 
> Just discovered that none of my replies made it to the mailing list.
> Doesn't it bug others that the default reply is to the author and not
> the list?
> 
> 
> ---------- Forwarded message ----------
> From: Trans <[email protected]>
> Date: Sun, Sep 25, 2016 at 9:36 PM
> Subject: Re: [swift-evolution] Propagating Optionals
> To: William Sumner <[email protected]>
> 
> 
> On Sun, Sep 25, 2016 at 7:26 PM, William Sumner <[email protected]> wrote:
>> 
>> You can accomplish this using parenthesis:
>> 
>> let roomCount = (john.residence ?? homelessShelter).numberOfRooms
> 
> Yea. Don't know why that escaped me. Though it does start to look long
> in the tooth if there is more than one.
> 
>    let x = ((foo.bar ?? dbar).baz ?? dbaz).zee
> 
> vs
> 
>    let x = foo.bar:dbar.baz:dbaz.zee

I’m not sure what I’d expect a raw `:` operator to do, but whatever it is I’d 
expect it to have a lower priority than `.`, making your statement equal to

    let x = (foo.bar) : (dbar.baz) : (dbaz.zee)

Member access (`.`) is a *very* high precedence operator in every language I 
can think of, and I think it would be quite confusing to slip something in 
above it.

> 
> But then again maybe that is too concise.
> 
> 
> -- 
> People with courage and character always seem sinister to the rest.
> --Hermann Hesse
> 
> Trans <[email protected]>
> 7r4n5.com      http://7r4n5.com
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to