[swift-evolution] Add unless/if single line syntax
J. Cheyo Jimenez
cheyo at masters3d.com
Sat Dec 12 08:43:54 CST 2015
-1 from me. I think I would rather have an if-then expression that would
handle both False and True cases.
Also, in most cases I feel that guard would be a better choice.
On Sat, Dec 12, 2015 at 5:39 AM, James Campbell via swift-evolution <
swift-evolution at swift.org> wrote:
> I propose adding the unless and if statements from ruby.
> Return false if james = nil
> This returns false if the variable James is nil
> . This line does it unless james is nil:
> Return false unless james = nil
> This has been really handy when working in ruby, reduces lines and
> pyramids of doom
> Sent from my iPhone
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution