[swift-evolution] Optional Assignment Operator
Derrick Ho
wh1pch81n at gmail.com
Wed Jan 25 12:20:03 CST 2017
-1
On Wed, Jan 25, 2017 at 1:11 PM Joe Groff via swift-evolution <
swift-evolution at swift.org> wrote:
>
> > On Jan 25, 2017, at 9:47 AM, Jacob Bandes-Storch <jtbandes at gmail.com>
> wrote:
> >
> > Really? My observation from a quick test is that "a? = b" assigns b to a
> if a already has a value, or does nothing if it's nil. This is sort of the
> opposite of what's being proposed, which is that "a ?= b" should assign to
> a only if it does NOT have a value.
>
>
> My mistake, I misread the proposal. What Nichi appears to be suggesting is
> an assignment that only happens when `b` has a value. I would hesitate to
> spell that `?=` since that's so similar to '? =', but perhaps it's useful,
> though there are many ways to spell that already.
>
> -Joe
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170125/ee161d8f/attachment.html>
More information about the swift-evolution
mailing list