>
> I don’t read “*Guard that x is higher than 0 else … *”, but instead I
> read it like “*Guard! x must be higher than 0 else …*”.
>
>
I see, yes I hadn't considered this interpretation...
>
> Probably adding a colon could make it more clear to the reader:
>
> guard: x > 0 else {
> return
> }
>
> But then we risk to add complexity to the syntax.
>
I actually like this better than ensure - it makes a lot of sense. It would
also force the second interpretation as you mentioned above. If 'guard' was
simply renamed to 'guard:' (or depending on how you look at it, required to
have a colon after it), how would it complicate the syntax?
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution