[swift-evolution] the "guard" keyword, again
Leonardo Pessoa
me at lmpessoa.com
Tue Jun 21 07:32:02 CDT 2016
Perhaps that was the original idea (guard as a multithreaded statement)
since in iOS your code and the UI run on different threads. Anyway, I'd
still stick with guard as I don't think this is confusing enough to justify
a change.
On Tuesday, 21 June 2016, James Campbell via swift-evolution <
swift-evolution at swift.org
<javascript:_e(%7B%7D,'cvml','swift-evolution at swift.org');>> wrote:
> I think unless has always made more sense, guard felt like a multithreaded
> statement as in guard this variable from other threads.
>
> *___________________________________*
>
> *James⎥Head of Trolls*
>
> *james at supmenow.com⎥supmenow.com <http://supmenow.com>*
>
> *Sup*
>
> *Runway East *
>
> *10 Finsbury Square*
>
> *London*
>
> * EC2A 1AF *
>
> On 21 June 2016 at 09:14, Rimantas Liubertas via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>>
>> In summary, “require … else” is a very clean choice and beats “guard ...
>>> else” handily.
>>>
>>
>> For you maybe. I prefer quard—it carries slightly different semantic load
>> and fits more cases, imho.
>>
>> r.
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>>
>
--
L
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160621/d3bb2d34/attachment.html>
More information about the swift-evolution
mailing list