[swift-evolution] Proposal: An assignment operator := that ensures nil before assignment.

Stephen Celis stephen.celis at gmail.com
Sat Feb 27 10:24:29 CST 2016

> On Feb 27, 2016, at 11:21 AM, Amir Michail <a.michail at me.com> wrote:
>> On Feb 27, 2016, at 11:19 AM, Ross O'Brien <narrativium at gmail.com> wrote:
>> The justification for assertions in general is unnecessary. Swift already has assertion functions: "assert" and "precondition" (even though it's still not clear to me why we have two of them). This thread isn't about software assertions.
>> This thread is about your := assertion operator. This thread *is* the exploration of it, as it relates to Swift. You think it would be worth including in Swift? Then argue its case. Tell us why := is useful. Provide a code sample of one of the situations you think it would be used so often for. Show us the value.
> Again, this would require an empirical study like the Microsoft one. You can’t argue your way through it.

But if you were to provide a reasonably thorough argument for proposing it here it could be taken more seriously.

My earlier (repeated) questions were my attempt of better understanding exactly what is driving your motivation behind the proposal. Are you evading them for a reason? I would like to actually give a careful consideration of your proposals in the future, but without carefully answering these questions I find it difficult to give them fair evaluations

So, let's try this again:

- Why do you want this feature?

- Would you please provide a better, real-world example (perhaps code extracted from a real-world project you've worked on that would benefit) that demonstrates the benefits of your suggestion?

- Can you go into more detail on the the design of the proposal? How it may be implemented? Caveats? Alternatives considered?


More information about the swift-evolution mailing list